32位下 CGFloat 等于float 64位下 CGFloat 等于double iPhone5C之前都是32位 iPhone5C之后都是64未 写OC程序的时候建议用CGFloat,可以不用关注设备的差异性 UI的时候坐标都用是CGFloat标注的 NSInteger与NSUInterger原 ...
分类:
其他好文 时间:
2016-10-09 06:51:25
阅读次数:
98
@implementation TWPaperTimeCountLabel { NSInteger miaoshu; dispatch_source_t _timer; } -(id)initWithframe:(CGRect)frame endTime:(NSDate *)endtime dele ...
分类:
其他好文 时间:
2016-09-28 12:11:30
阅读次数:
142
- (void)addSubview:(UIView *)view; 添加一个子控件view - (void)removeFromSuperview; 将自己从父控件中移除 - (UIView *)viewWithTag:(NSInteger)tag; 根据一个tag标识找出对应的控件(一般都是子控 ...
分类:
其他好文 时间:
2016-09-23 23:25:08
阅读次数:
189
1、首先先了解下NSNumber类型: 苹果官方文档地址: https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Refere ...
分类:
其他好文 时间:
2016-09-19 16:12:01
阅读次数:
129
来源:网络 assign: 普通(简单)赋值,一般常用于基本数据类型,常见委托设计模式,一次来防止循环引用。不更改索引计数(Reference Counting)。 对基础数据类型 (NSInteger,CGFloat)和C数据类型(int, float, double, char, 等等) ret ...
分类:
移动开发 时间:
2016-09-11 00:03:23
阅读次数:
352
你真的了解UIbutton,UILabel吗? 一:首先查看一下关于UIButton的定义 @class UIImage, UIFont, UIColor, UIImageView, UILabel; //设置UIButton的样式 typedef NS_ENUM(NSInteger, UIButt ...
分类:
其他好文 时间:
2016-08-30 09:27:20
阅读次数:
150
iOS开发基础知识--碎片22 1:设置有间距的表格行(UITableViewStyleGrouped) 1.设置section的数目,即是你有多少个cell - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { re ...
分类:
移动开发 时间:
2016-08-22 21:30:39
阅读次数:
250
一、block声明 1、无参数,无返回值: void (^sayHi)(); 2、有参数,有返回值: NSInteger (^operateOfValue)(NSInteger num); block的声明:返回值类型(^block变量名)(参数列表) 脱字符(^)是块的语法标记 二、block实现 ...
分类:
其他好文 时间:
2016-08-22 18:19:40
阅读次数:
134
//显示有多少组 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView //显示每组的头部 -(UIView*)tableView:(UITableView *)tableView viewForHeaderInSecti ...
分类:
移动开发 时间:
2016-08-20 13:15:18
阅读次数:
241
#import <AVFoundation/AVFoundation.h> { NSInteger _timeCount; NSTimer *_timer; } @property(nonatomic,retain)AVAudioPlayer *audioPlayer;@property(nonat ...
分类:
移动开发 时间:
2016-08-18 19:38:10
阅读次数:
157