04 2016 档案
摘要:添加数据源, 由三个函数来回答数据绑定的请求:numberOfSectionsInTableView, numberOfRowsInSection 和 cellForRowAtIndexPath. 用numberOfSectionsInTableView方法来返回table中有几个组. - (NSI
阅读全文
摘要:本文为博主原创文章,未经博主允许不得转载。 本文为博主原创文章,未经博主允许不得转载。 目录(?)[+] 目录(?)[+] 一、背景概述: 1,环境配置 APNS:Apple Push Notification Service。本文对推送相关概念不再赘述,只侧重完整流程。 Demo 开发环境:Mac
阅读全文
摘要:一、键盘风格 UIKit框架支持8种风格键盘。 typedef enum { UIKeyboardTypeDefault, // 默认键盘:支持所有字符 UIKeyboardTypeASCIICapable, // 支持ASCII的默认键盘 UIKeyboardTypeNumbersAndPunct
阅读全文
摘要:@interface ViewController ()<UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate,UISearchResultsUpdating>@property(nonatomic,strong) NSMutab
阅读全文
摘要:iOS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem s
阅读全文
摘要:-(void)scrollviewff{ self.scrollview=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 200)]; _scrollview.backgroundColo
阅读全文
摘要://实现可以连续绘画, 不让画笔每次touchBegin时都重新初始化 - (UIBezierPath *)path { if (!_path) { _path = [UIBezierPath bezierPath]; } return _path; } - (void)drawRect:(CGRe
阅读全文
摘要:- (void)exitApplication { [UIView beginAnimations:@"exitApplication" context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationDelegate:sel
阅读全文
摘要:@interface ViewController ()void UIImageWriteToSavedPhotosAlbum ( UIImage * image, id completionTarget, SEL completionSelector, void *contextInfo );@e
阅读全文
摘要://判断 if ([([UIApplication sharedApplication]currentUserNotificationSettings].types!=UIUserNotificationTypeNone) { UILocalNotification *ln =[[UILocalNo
阅读全文
摘要://这个变量用于记录授权是否成功,即用户是否允许我们访问通讯录 int __block tip=0; //声明一个通讯簿的引用 ABAddressBookRef addBook =nil; //因为在IOS6.0之后和之前的权限申请方式有所差别,这里做个判断 if ([[UIDevice curre
阅读全文
摘要:NSString * identifierForVendor =[[UIDevice currentDevice].identifierForVendor UUIDString]; NSLog(@"%@dd",identifierForVendor);//唯一标识 [[UIDevice curren
阅读全文
摘要:// 打电话 // 弊端:使用该方法进行拨号之后,当电话挂断之后不会返回应用程序, 会停留在通话记录界面// NSURL *url = [NSURL URLWithString:@"tel://13261936021"];// [[UIApplication sharedApplication] o
阅读全文

浙公网安备 33010602011771号