04 2015 档案
摘要:1. 建一个 UIView的子类(MyView.h/MyView.m)2. 建一个 View类型的XIB3. 把xib的file‘s owner设为MyView4. 在.h文件里加上@property (nonatomic, retain) IBOutlet UIView *contentView;...
阅读全文
摘要:转自:http://dadage456.blog.163.com/blog/static/303107442014911417527161、创建一个空白的UIViewController2、将UIScrollView添加到UIView控件中,并设置UIScrollView针对父视图UIView的co...
阅读全文
摘要:到Storyboard中,选择collection view controller中的"Collection View"。在Attributes inspector中,选择"Section Header"和"Section Footer",一旦选中你就会在屏幕中看到下面的的显示:最重要的是,我们必须...
阅读全文
摘要:- (void)viewDidLoad { [super viewDidLoad]; NSDateComponents *fromDateComponents = [[NSDateComponents alloc]init]; NSDateComponents *toDat...
阅读全文
摘要:设置View borderWidth/cornerRadius/borderColor为了兼容CALayer 的KVC ,你得给CALayer增加一个分类CALayer+BorderColor.h#import #import @interface CALayer (BorderColor)@pro...
阅读全文
摘要:/** * 指定Size压缩图片 (图片会压缩变形) * * @param image 原图 * @param size 压缩size * * @return 压缩后的图片 */-(UIImage*)OriginImage:(UIImage *)image scaleToSize:(CGS...
阅读全文
摘要:xib 方式1.在Cell.h文件中加一个宏#define cellIdentifier @"customCell"2. ViewController中:- (void)viewDidLoad { [super viewDidLoad]; [_tableView registerNib:...
阅读全文

浙公网安备 33010602011771号