04 2019 档案

摘要:头文件: #import <AVFoundation/AVFoundation.h> 代理: AVAudioPlayerDelegate 单例头文件: #import "Singleton.h" @interface music : NSObject @property (nonatomic, co 阅读全文
posted @ 2019-04-18 21:11 纯粹的code 阅读(187) 评论(0) 推荐(0)
摘要:头文件 : import <AudioToolbox/AudioToolbox.h> 阅读全文
posted @ 2019-04-18 21:03 纯粹的code 阅读(338) 评论(0) 推荐(0)
摘要:-(void) animationAlert:(UIView *)view { CAKeyframeAnimation *popAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; popAnimation.duration = 3; popAnimation.values = @[[NS... 阅读全文
posted @ 2019-04-18 21:01 纯粹的code 阅读(1685) 评论(0) 推荐(0)
摘要:NSData *imagedata1=UIImagePNGRepresentation(btn.currentBackgroundImage);//按钮背景图片转NSData NSData *imagedata2=UIImagePNGRepresentation([UIImage imageNamed:@"资讯默认"]);//未选图片转NSData if([imagedata1 ... 阅读全文
posted @ 2019-04-18 20:56 纯粹的code 阅读(517) 评论(0) 推荐(0)
摘要:原理:由于textView是继承自UIScrollview,所以会有ContentSize属性。所以可以通过文字内容的高度(也就是ContentSize)的高度和textView的高度之间的差值,设置内边距,就相当于把内容居中了。 阅读全文
posted @ 2019-04-16 19:38 纯粹的code 阅读(4266) 评论(0) 推荐(0)
摘要:UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"IDENTIFIER"]; [self.navigationC... 阅读全文
posted @ 2019-04-11 14:53 纯粹的code 阅读(326) 评论(0) 推荐(0)