★iOS篇
scofieldcai专栏
酷爱技术
展开
-
How to realize the UIView convert to UIImage?
How to realize the UIView convert to UIImage?#import +(UIImage *)imageFromView:(UIView*)view{ UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, view.layer.contentsScale);原创 2012-10-16 15:03:48 · 548 阅读 · 0 评论 -
iOS项目开发经验:【常用代码7】
iOS 5.0 UIAlertView 可以使用 alertViewStyle 属性实现登陆等效果typedef enum { UIAlertViewStyleDefault = 0, UIAlertViewStyleSecureTextInput, UIAlertViewStylePlainTextInput, UIAlertViewStyleLoginA原创 2012-10-24 18:58:41 · 735 阅读 · 0 评论 -
iOS项目开发经验:【常用代码6】
取消tableViewCell选中状态- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //some functions ...... [tableView deselectRowAtIndexPath:indexPath a原创 2012-10-21 12:59:14 · 727 阅读 · 0 评论 -
iOS项目开发经验:【常用代码5】
自定义Navigation导航的titleViewUILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0 , 100, 44)];titleLabel.backgroundColor = [UIColor clearColor]; titleLabel.font = [UIFont boldSystemF原创 2012-10-21 09:31:15 · 807 阅读 · 0 评论 -
iOS项目开发经验:【常用代码2】
启动新的线程处理事件 [NSThread detachNewThreadSelector:@selector(doInNewThread) toTarget:self withObject:nil];只需要添加在doInNewThread方法中添加需要执行的操作。 遍历子控件,原创 2012-10-17 15:25:28 · 1239 阅读 · 0 评论 -
iOS项目开发经验:【常用代码4】
获取当前时间 NSString *nowDateString = [NSDateFormatter localizedStringFromDate:[NSDate date] dateStyle:NSDateFormatterMediumStyle原创 2012-10-18 01:52:40 · 1247 阅读 · 0 评论 -
iOS项目开发经验:【常用代码3】
判断当前设备是否越狱 +(BOOL)isJailbroken { BOOL isJailbroken = NO; NSString *cydiaPath = @”/Applications/Cydia.app”; NSString *aptPath = @”/private/var/lib/apt/”; if ([[NSFileManager defaultManager原创 2012-10-17 17:11:53 · 1428 阅读 · 0 评论 -
【Good learning resources】
Good learning resources1: http://stackoverflow.com/tags2: http://www.raywenderlich.com/tutorials3:http://www.techotopia.com/index.php/IOS_iPhone_iPad_eBooks原创 2012-10-16 15:23:38 · 807 阅读 · 0 评论 -
iOS开发icon图片尺寸大小官方说明
iOS开发icon图片尺寸大小官方说明Image Size (px)File NameUsed ForRequired Status512x512iTunesArtworkAd Hoc iTunesOptional but recommended57x57Icon.pngApp Store and the原创 2012-10-16 23:12:23 · 1500 阅读 · 1 评论 -
iOS项目开发经验:【常用代码1】
iOS项目开发常用代码1 获取全局AppDelegate实例对象,该类是单例(Singleton)AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate]; 获取屏幕的大小CGRect frame = [[UIScreen mainScreen] bounds];原创 2012-10-17 12:42:54 · 1436 阅读 · 0 评论