首页 软件开发 代码片段 objective-c ( Page 44 )

objective-c 628

#Objective-C
iOS文件操作的代码

NSData *condata = responseObject; //设置编码格式,这种编码格式可以正常读取中文 NSStringEncoding enc = CFStringC…

2015-01-20 305

#Objective-C
iOS应用中网络等待Loading的实现方法

UIWebView加载Loading…两种方法 第一种方法:使用UIView and UIActivityIndicatorView //创建UIWebView Web…

2015-01-20 606

#Objective-C
iOS视图翻页过渡效果

CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:…

2015-01-20 550

#Objective-C
iOS通过http post上传图片

//ASIFormDataRequest方式 POST上传图片 -(NSDictionary *)addPicWithDictionary:(NSDictionary *)suge…

2015-01-20 908

#Objective-C
iOS常用的几个动画代码

使用前 需引入QuartzCore.framework, 并在相关文件中加入 #import "QuartzCore/QuartzCore.h" 定义 shak…

2015-01-20 685

#Objective-C
iOS应用发送SMS短消息代码

//Import the MessageUI Framework into your project and //#import the header file into the …

2015-01-20 893

#Objective-C
iOS对图像进行压缩代码

- (UIImage*)scaleFromImage:(UIImage*)image scaledToSize:(CGSize)newSize { CGSize imageSize…

2015-01-20 337

#Objective-C
iOS实现圆角效果

UIColor *color = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:0]; [aImage setBack…

2015-01-20 534

#Objective-C
iOS隐藏键盘的代码

当前视图上有多个uitextfield时,来隐藏键盘, 先遍历视图的所有子视图来 如果是UITextField就将其设为非第一响应 当然,如果要隐藏子视图上的UITextField…

2015-01-20 1,024

#Objective-C
iOS检查网络是否可用的代码

SCNetworkReachabilityFlags flags; BOOL receivedFlags; SCNetworkReachabilityRef reachabilit…

2015-01-20 823

#Objective-C
在iOS App的icon左上角显示圆形背景的数字

- (void)applicationDidEnterBackground:(UIApplication *)application{ [[UIApplication shared…

2015-01-20 309

#Objective-C
iOS从远程地址获取图片并修改尺寸

NSString* imageURL = [NSString stringWithFormat: @"http://theimageurl.com/?id=%@"…

2015-01-20 1,028
1 42 43 44 45 46 53