
API的一些方法
无聊的坤
这个作者很懒,什么都没留下…
展开
-
oc的基本数据的转换
-(int)intValue;//字符串转换为整型;-(float)floatValue;//字符串转换为浮点型.-(BOOL)boolValue;//字符串转换为布尔值类型.{NSInteger integerNumber = 888;NSString * string = [NSString stringWithFormat:@"%d",integerNumber]; }/原创 2014-01-20 19:49:42 · 2493 阅读 · 0 评论 -
UIScrollView属性全总结
属性 作用 CGPoint contentOffSet 监控目前滚动的位置 CGSize contentSize 滚动范围的大小 UIEdgeInsets contentInset 视图在scrollView中的位置 id delegate 设置协议 BOOL directionalLo原创 2014-02-20 22:29:20 · 969 阅读 · 0 评论 -
imageView阴影和圆角效果的处理
#import 这样才能启动UIImageView中layer的一个category自己随意拖一张图片 UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"11.jpg"]]; [imageView setFrame:CGRectMake(10, 30, 3原创 2014-02-20 20:18:21 · 3289 阅读 · 1 评论 -
view移除所有子视图
如果要移除一个 UIView 的所有子视图,SDK 里没有 remove all 之类的方法。可以用 for loop 循环调用 – removeFromSuperview 来移除 例如:for(UIView *view in [self.view subviews]){ [view removefromsuperview]}原创 2014-02-21 16:46:55 · 1409 阅读 · 0 评论 -
字符串常用的几个方法
创建一个字符串对象NSstring * str1 = @"hello";NSString * str = [[NSString alloc]initWithString:@"hello world!"];NSString * str_1 = [[NSString alloc]initWithUTF8String:"hello world"];//把C的字符串转化为OC的字符串int a转载 2014-03-06 11:46:45 · 946 阅读 · 0 评论