会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
step by step,go along
just do it
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
9
10
11
12
13
14
15
下一页
2015年1月5日
NSString NSUrl 相互转化
摘要: //NSString 转为 NSURL NSString *webStr = @"www.baidu.com"; NSURL *webUrl = [NSURL URLWithString:webStr]; //NSURL 转为 NSString NSStrin...
阅读全文
posted @ 2015-01-05 12:13 shidaying
阅读(653)
评论(0)
推荐(0)
2014年12月5日
UIViewController的生命周期
摘要: 生命周期 我们建立一个简单的模型来测试生命周期:新建两个ViewController,一个是主视图控制器(main ViewController,以下简称mainVC),一个是副视图控制器(sub ViewController,以下简称subVC),在mainVC里点击一个Button,以modal
阅读全文
posted @ 2014-12-05 11:55 shidaying
阅读(322)
评论(0)
推荐(0)
2014年10月28日
iOS xcode6 设置多语言
摘要: 1,首先新建一个文件,选中ios模块下Rescource的Strings File 类型。eg:文件2,选中该文件,右边栏选该文件属性,选中Localizable模块,选中localiz,这时会弹出一个框,默认值为base,可以选为English 或者是 Chinese(Simplified)3,L...
阅读全文
posted @ 2014-10-28 17:57 shidaying
阅读(1493)
评论(0)
推荐(0)
2014年10月27日
swift 项目 oc 和 swift 混用,文件相互引用
摘要: 创建swift工程后,如果后面想新建 oc 文件,这时会生成一个 AppName-Bridging-Header.h文件一,在swift 文件中1> 引用swift 文件什么都不需要操作,在所有的swift 文件中,都是可以相互使用的2> 引用oc 文件AppName-Bridging-Header...
阅读全文
posted @ 2014-10-27 15:39 shidaying
阅读(1511)
评论(0)
推荐(0)
iOS xcode6 添加.pch文件
摘要: 1, 新建文件 (command+N)选择other组,再次选择pch,输入文件名保存。 eg: 创建的工程为Demo; 创建文件名为DemoPrefixHeader.pch2,到工程里面的build setting ->apple llvm 6.0 - language -> Prefix Hea...
阅读全文
posted @ 2014-10-27 15:10 shidaying
阅读(208)
评论(0)
推荐(0)
2014年9月19日
ios UIView sizeToFit sizeThatFits
摘要: UILabel *testLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 50, 0, 0)]; testLabel.backgroundColor = [UIColor whiteColor]; testLabel.tex...
阅读全文
posted @ 2014-09-19 15:10 shidaying
阅读(986)
评论(0)
推荐(0)
ios UIView autoresizingSubview 属性
摘要: 自动尺寸调整行为当您改变视图的边框矩形时,其内嵌子视图的位置和尺寸往往也需要改变,以适应原始视图的新尺寸。如果视图的autoresizesSubviews属性声明被设置为YES,则其子视图会根据autoresizingMask属性的值自动进行尺寸调整。简单配置一下视图的自动尺寸调整掩码常常就能使应用...
阅读全文
posted @ 2014-09-19 14:37 shidaying
阅读(758)
评论(0)
推荐(0)
ios 常用数学函数
摘要: 需要 引入头文件 #import 1、三角函数 double sin (double);正弦 double cos (double);余弦 double tan (double);正切2 、反三角函数 double asin (double); 结果介于[-PI/2, PI/2] doub...
阅读全文
posted @ 2014-09-19 13:40 shidaying
阅读(548)
评论(0)
推荐(0)
ios CGRect
摘要: /* rect(x,y,width,height); width, height正负代表了从原点的绘制方向,矩形的长宽都是取得绝对值 */ // Do any additional setup after loading the view, typically from a nib.#prag...
阅读全文
posted @ 2014-09-19 12:57 shidaying
阅读(4392)
评论(0)
推荐(0)
2014年7月27日
ios 截屏
摘要: 把当前屏幕作为获取成为图片- (UIImage *)rn_screenshot { UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; U...
阅读全文
posted @ 2014-07-27 21:53 shidaying
阅读(126)
评论(0)
推荐(0)
上一页
1
···
9
10
11
12
13
14
15
下一页
公告