- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 iOS中如何修改UISegmentedControl的背景颜色和字体的颜色UISegmentedControl
segmentedControlStyle在iOS7 之后设置没有效果了那么如何快速的设置UISegmentedControl的背景颜色呢?#define RGBACOLOR(r, g, b, a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
2014-12-31 15:52:53 5072
原创 iOS中如何修改系统自带的导航栏的颜色
#define RGBACOLOR(r, g, b, a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]self.navigationController.navigationBar.barTintColor=RGBACOLOR(139,208, 191, 1);
2014-12-31 15:12:33 755
原创 iOS如何让button的title居左显示
xcode的右边。点击button,会出现control的属性图标,选择其中的居左的坐标即可如何是代码实现的button,detailButton.titleLabel.textAlignment=NSTextAlignmentRight;即可
2014-12-30 10:41:27 794
原创 iOS中如何动态获取label的宽度和高度
iOS7.0之后的sizeWithFont用不了了,现在用这种方法代替UIFont *fnt=[UIFontfontWithName:@"HelveticaNeue"size:14.0f]; InfoLabel.font=fnt; CGSize labelSize=[InfoLabel.textsizeWithAttributes:[NSD
2014-12-30 09:39:39 813
原创 iOS中使用storyboard时出现警告Unsupported Configuration: Scene is unreachable due to lack of entry points and
使用storyboard时出现警告Unsupported Configuration: Scene is unreachable due to lack of entry points and
2014-12-24 09:59:21 1346
转载 iOS 中的 va_list\va_arg\va_start和va_end的使用
va_list用于声明一个变量,我们知道函数的可变参数列表其实就是一个字符串,所以va_list才被声明为字符型指针,这个类型用于声明一个指向参数列表的字符型指针变量,例如:va_list ap;//ap:arguement pointerva_start(ap,v),它的第一个参数是指向可变参数字符串的变量,第二个参数是可变参数函数的第一个参数,通常用于指定可变参数列表中参数的个数。va_arg
2014-12-19 10:28:45 1804
原创 iOS MD5 算法
- (NSString *)MD5Hash{constchar *cStr = [selfUTF8String];//转化为utf-8unsignedchar result[16];//开辟一个16字节(128位:md5加密出来就是128位/bit)的空间(一个字节=8字位=8个二进制数) /* extern unsigned char *C
2014-12-19 09:27:16 679
原创 Objective-c中在ARC环境下使用PerformSelector方法回产生警告
Objective-c中在ARC环境下使用PerformSelector方法回产生警告:PerformSelector may cause a leak because its selector is unknown 解决办法是:添加这三行代码
2014-12-18 17:25:42 935
原创 Xcode6创建空工程详细做法
下载完AddMissingTemplates-master之后,那么手动进入文件夹AddMissingTemplates-master,然后把Empty Application.xctemplate 拷贝到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application下就可以了,但是要保证你的Xc
2014-12-18 13:09:44 1043
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人