自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

iOS源碼下載:對(duì)輸入的字用動(dòng)畫畫出來

移動(dòng)開發(fā)
對(duì)輸入的字用動(dòng)畫畫出來,附源碼下載。實(shí)現(xiàn)對(duì)字符串的畫線動(dòng)畫,可以在類方法中修改動(dòng)畫大小和位置,以及畫線的顏色。

功能分類:特效

支持平臺(tái):iOS

運(yùn)行環(huán)境:iOS

開發(fā)語言:Object-c

開發(fā)工具:Xcode

源碼大小:174.88KB

源碼下載地址:http://down.51cto.com/data/1975235

源碼簡(jiǎn)介

實(shí)現(xiàn)對(duì)字符串的畫線動(dòng)畫,可以在類方法中修改動(dòng)畫大小和位置,以及畫線的顏色。

源碼運(yùn)行截圖

效果圖

源碼片段

  1. -(void)startDraw:(UIButton*)sender 
  2.     for (id layer in self.view.layer.sublayers) { 
  3.         if([layer isKindOfClass:[ZYAnimationLayer class]]) 
  4.         { 
  5.             [layer removeFromSuperlayer]; 
  6.         } 
  7.     } 
  8.     [ZYAnimationLayer createAnimationLayerWithString:self.myTextField.text andRect: CGRectMake(20.0f, -100.0f, 
  9.                                                                                               CGRectGetWidth(self.view.layer.bounds) - 40.0f, 
  10.                                                                                                CGRectGetHeight(self.view.layer.bounds) - 84.0f) andView:self.view andFont:CTFontCreateWithName(CFSTR("Helvetica-Bold"), 80.0f, NULL) andStrokeColor:[UIColor colorWithRed:0.3 green:0.2 blue:0.5 alpha:1]]; 
  11. - (void)textFieldDidBeginEditing:(UITextField *)textField 
  12.     self.myTextField.frame = CGRectMake(self.myTextField.frame.origin.x, self.myTextField.frame.origin.y - 252, self.myTextField.frame.size.width, self.myTextField.frame.size.height); 
  13. - (void)textFieldDidEndEditing:(UITextField *)textField 
  14.     self.myTextField.frame = CGRectMake(self.myTextField.frame.origin.x, self.myTextField.frame.origin.y + 252, self.myTextField.frame.size.width, self.myTextField.frame.size.height); 

源碼下載地址:http://down.51cto.com/data/1975235

責(zé)任編輯:閆佳明 來源: 網(wǎng)絡(luò)整理
相關(guān)推薦

2023-03-27 08:03:46

ChatGPTMidjourney主角

2020-06-22 17:44:35

MySQL表鎖

2017-09-11 17:52:35

APP

2023-02-10 17:20:29

2020-09-17 16:00:03

Python 開發(fā)編程語言

2023-07-04 14:05:15

AI創(chuàng)意

2015-01-20 17:15:55

iOS源碼滾動(dòng)視圖

2015-02-11 18:02:59

iOS源碼Swift圖表庫

2015-01-19 12:19:04

iOS源碼ActionSheet仿QQ音樂

2024-07-01 08:19:56

2024-07-29 08:43:57

2012-12-24 13:38:01

iOSUIView

2015-01-15 16:34:31

iOS源碼單元格

2013-01-04 15:47:54

Android開發(fā)平鋪UI設(shè)計(jì)

2014-07-15 09:26:13

swiftiosMPGNotifica

2015-01-15 16:45:05

iOS源碼自定義畫圖

2014-05-09 11:23:29

iOS移動(dòng)互聯(lián)網(wǎng)

2011-10-19 10:24:25

JavaScript

2023-09-19 08:28:32

DiagramsPython工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)