随笔分类 -  Cocoa-ios

摘要:  国际惯例,先上图   苹果内置 所有字体名称(2015.03.15)这里是demo   以下来自http://my.oschina.net/u/2340880   阅读全文
posted @ 2016-03-15 15:03 人生路1/5 阅读(539) 评论(0) 推荐(0)
摘要:AFNetworking 3.0使用 // 取消所有网络 请求 // 取消请求 [self.manager.tasks makeObjectsPerformSelector:@selector(cancel)]; // 销毁会话管理者 [self.manager invalidateSessionC 阅读全文
posted @ 2016-03-11 17:11 人生路1/5 阅读(280) 评论(0) 推荐(0)
摘要:+(void)initialize{ UINavigationBar *item = [UINavigationBar appearance]; // 按钮的颜色 item.tintColor = [UIColor redColor]; // 整个背景的颜色 item.barTintColor = 阅读全文
posted @ 2016-03-10 19:33 人生路1/5 阅读(495) 评论(0) 推荐(0)
摘要:// 字符串转Data NSString *str =@"jesfds"; NSData *data =[str dataUsingEncoding:NSUTF8StringEncoding]; //NSData 转NSString NSString *result =[[ NSString all 阅读全文
posted @ 2016-03-08 14:03 人生路1/5 阅读(223) 评论(0) 推荐(0)
摘要:1 - (void)test{ 2 //1.构造URL 3 NSURL *url = [NSURL URLWithString:@"https://api.weibo.com/2/statuses/update.json"]; 4 5 //2.构造Request 6 NSMutableURLRequ 阅读全文
posted @ 2016-03-08 10:43 人生路1/5 阅读(220) 评论(0) 推荐(0)
摘要:iOS中UIWebView的使用详解 2016-03-05 20:04:03.950 webWiew[52644:2355401] -[ViewController webView:shouldStartLoadWithRequest:navigationType:] -- <NSMutableUR 阅读全文
posted @ 2016-03-05 22:24 人生路1/5 阅读(499) 评论(0) 推荐(0)
摘要:弹簧特效 1 - (void)viewDidLoad { 2 [super viewDidLoad]; 3 4 [self addBarButton]; 5 UIView *view = [[UIView alloc] init]; 6 self.kkview = view; 7 // view.f 阅读全文
posted @ 2016-03-04 16:37 人生路1/5 阅读(286) 评论(0) 推荐(0)
摘要:保存图片到相册 - (IBAction)save_clcik:(UIButton *)sender { if (self.imgView.image==nil) { [SVProgressHUD showWithStatus:@"正在努力加载中..."]; return; } // 将图片写入到相册 阅读全文
posted @ 2016-03-03 08:43 人生路1/5 阅读(197) 评论(0) 推荐(0)
摘要:自定义 @interface KKTabBar : UITabBar NS_CLASS_AVAILABLE_IOS(2_0) @interface UITabBar : UIView UITabBar 继承自 UIView所以可以在 UITabBar 上添加view啦。 - (instancetyp 阅读全文
posted @ 2016-03-02 20:56 人生路1/5 阅读(128) 评论(0) 推荐(0)
摘要:NSURL *url = [NSURL URLWithString:url1]; NSString *xmlString = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:NULL]; 阅读全文
posted @ 2016-03-02 20:36 人生路1/5 阅读(377) 评论(0) 推荐(0)
摘要:导入 MessageUI.framework #import <MessageUI/MessageUI.h> 实现代理 MFMessageComposeViewControllerDelegate 1 - (void)sendMessage 2 { 3 //发短信 不能设置短信内容 4 //[[UI 阅读全文
posted @ 2016-03-02 20:29 人生路1/5 阅读(269) 评论(0) 推荐(0)
摘要:fmdb相关 导入 #import "FMDB.h" 和 首先,将Collection.sqlite文件,拷贝到docment,文件中 1 // 拷贝文件 2 - (void)copyFile{ 3 4 // 获取文件夹的路径 5 NSString *doc = [NSSearchPathForDi 阅读全文
posted @ 2016-03-02 20:20 人生路1/5 阅读(371) 评论(0) 推荐(0)
摘要:报错:(<UIStoryboard: 0x7fa9c3d72360>) doesn't contain a view controller with identifier 'UIViewController-76T-IN-z 原因:未知 解决方法:cmd+shift+k 从Storyboard中加载 阅读全文
posted @ 2016-03-02 16:42 人生路1/5 阅读(565) 评论(0) 推荐(0)
摘要:1.获取私有成员变量 1 unsigned int num = 0; 2 Ivar *ivars = class_copyIvarList([UITextField class], &num); 3 for (int i=0; i<num; i++) { 4 Ivar ivar = *(ivars+ 阅读全文
posted @ 2016-02-25 17:43 人生路1/5 阅读(119) 评论(0) 推荐(0)
摘要:readme 1 #import "ViewController.h" 2 #import "SVProgressHUD.h" 3 4 @interface ViewController () 5 - (IBAction)seitchClick:(UISwitch *)sender; 6 7 @en 阅读全文
posted @ 2016-02-22 10:45 人生路1/5 阅读(253) 评论(0) 推荐(0)
摘要:// 让按钮内部的所有内容左对齐 button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; // 让按钮的内容往左边偏移10 button.contentEdgeInsets = UIEdgeInsets 阅读全文
posted @ 2016-02-21 18:57 人生路1/5 阅读(192) 评论(0) 推荐(0)
摘要:1. 添加远程仓库(这里并不能把所有的代码,下载到本地。你可以查看,远程仓库上的代码) 2.添加,远程代码仓库 之后 3.将仓库上的代码,下载到本地 完成之后,本地文件夹,就会有,仓库上的代码了,就是这样了 4.创建一个新的xcode工程 5.如果这样 如果更新,会有问题出现。如下, 之后会出现这个 阅读全文
posted @ 2016-02-19 19:25 人生路1/5 阅读(232) 评论(0) 推荐(0)
摘要:1 #import <UIKit/UIKit.h> 2 3 @interface UIBarButtonItem (Extension) 4 + (UIBarButtonItem *)itemWithImageName:(NSString *)imageName highImageName:(NSS 阅读全文
posted @ 2016-02-18 10:59 人生路1/5 阅读(239) 评论(0) 推荐(0)
摘要:1 #import <UIKit/UIKit.h> 2 @class KKTabBar; 3 4 @protocol KKTabBarDelegate <NSObject> 5 6 - (void)tabBarDidPlusClick:(KKTabBar *)tabBar; 7 8 @end 9 1 阅读全文
posted @ 2016-02-18 09:08 人生路1/5 阅读(172) 评论(0) 推荐(0)
摘要:1 NSMutableArray *arr = [[NSMutableArray alloc] initWithArray:@[@"a",@"b",@"c"]]; 2 3 NSArray *arr1 = @[@"1",@"2"]; 4 5 NSRange range = NSMakeRange(0, 阅读全文
posted @ 2016-02-13 13:17 人生路1/5 阅读(160) 评论(0) 推荐(0)