![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
文章平均质量分 80
340244120
这个作者很懒,什么都没留下…
展开
-
UIAlertController
// 创建UIAlertControlller对象(设置标题,内容,显示风格为Alert或ActionSheet)UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"原创 2015-09-09 19:20:49 · 250 阅读 · 0 评论 -
数组与字典的应用
一组数据有图片及文字描述 // 设置数组属性@interface@property (nonatomic, strong) NSArray *imageData;@property (nonatomic, assign) int index;@end@implementation // 创建包含 图片名称及描述 的字典 NSMutableDi原创 2015-10-13 21:42:43 · 1560 阅读 · 0 评论 -
初始化NSDate为指定时间(Initialize a NSDate object with a specific time)
方法一:NSString *dateString = @"03-Sep-11";NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];dateFormatter.dateFormat = @"dd-MMM-yy";NSDate *date = [dateFormatter dateFromString:date原创 2015-12-10 11:59:20 · 517 阅读 · 0 评论 -
UI控件strong,weak指针的选择
1 直接在storyboard布局控件,或者控制器内用[self.view addSubview:]加入控件. 因为此时UIView对象直接拥有控件, 故控制器控件属性使用weak指针.2 控制器懒加载设置控件(且不使用[self.view addSubview:]) 因为懒加载代码执行完毕后,view并没有指向该控件对象,故需要使用strong指针指向控件,否则懒加载初原创 2015-12-10 12:10:20 · 364 阅读 · 0 评论 -
更新xcode后插件失效解决方法
控制台运行find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults re转载 2015-12-11 10:33:01 · 300 阅读 · 0 评论 -
Xcode模拟器路径
。 1、Xcode6模拟器路径的变更 在Xcode5和之前的版本中,Xcode的模拟器路径为:/Users/username/Library/Application Support/iPhone Simulator。 在Xcode6中,将模拟器的位置进行了变更,地址如下:/Users/username/Library/Develop转载 2015-12-14 17:39:26 · 1039 阅读 · 0 评论 -
数据储存
1. plist储存注意储存以下类型对象(writeToFile: atomically:) 1.1储存 // 1.获取沙盒根路径NSString *path = NSHomeDirectory();// 2.document路径NSString *docPath = [path stringByAppendingPathComponent:@"Documents"];// 3.新建数据NS原创 2015-12-13 16:30:24 · 347 阅读 · 0 评论 -
Test
Objective-C//// ContactsViewController.m// 01- 私人通讯录//// Created by HiJack on 15/12/10.// Copyright © 2015年 HiJack. All rights reserved.//#import "ContactsViewController.h"#import "Ad原创 2015-12-17 10:19:31 · 333 阅读 · 0 评论