摘要:
效果如下:ViewController.h1 #import 2 3 @interface ViewController : UIViewController4 @property (nonatomic, strong) UILabel *lblParent;5 @property (nonatom... 阅读全文
摘要:
效果如下:ViewController.h 1 #import 2 3 @interface ViewController : UIViewController { 4 @private 5 UIImageView *imgVTransform; 6 CGFloat ro... 阅读全文
摘要:
效果如下:ViewController.h 1 #import 2 3 @interface ViewController : UIViewController { 4 @private 5 UILabel *lblMessage; 6 CGFloat colorRed;... 阅读全文
摘要:
为什么需要使用锁,当然熟悉多线程的你,自然不会感到陌生。那你在代码中是否很好的使用了锁的机制呢?你又知道几种实现锁的方法呢?main.m 1 int main(int argc, const char * argv[]) { 2 @autoreleasepool { 3 //... 阅读全文
摘要:
设备对照表:https://www.theiphonewiki.com/wiki/Models获取设备和 App 信息代码: 1 NSLog(@"设备信息如下"); 2 NSLog(@"detailModel(详细型号): %@", [self detailModel]); //de... 阅读全文
摘要:
讲解 UICollectionView 的相关链接:http://blog.csdn.net/eqera/article/details/8134986关键操作:效果如下:KMCollectionViewCell.h1 #import 2 3 @interface KMCollectionViewC... 阅读全文
摘要:
在图片处理时,我们总会遇到一些内存优化的问题。这里介绍的是其中一种内存优化处理方式。场景:App 运行很卡,然后我用 Instruments中的相关工具查看对象的内存占用情况,发现当图片加载到 UICollectionView 容器时, 工具中 Allocations 内存分配栏目,lifespa... 阅读全文
摘要:
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight这是 UIImage 的一个实例方法,它的功能是创建一个内容可拉伸,而边角不拉伸的图片,... 阅读全文
摘要:
关键技能:使用故事板进行布局时,点击选中控件(组件)并按住 control 键向某个方向拖动,产生一条实线,然后弹出的窗口可以设置控件(组件)的布局约束条件;从而实现自动布局AutoLayout效果。效果如下:iPhone 5siPhone 6iPhone 6 PlusViewController... 阅读全文
摘要:
效果如下:ViewController.h1 #import 2 @interface ViewController : UIViewController3 @property (strong, nonatomic) IBOutlet UIImageView *imgVQRCode;4 5 @end... 阅读全文