2014年11月20日
摘要: http://blog.sina.com.cn/s/articlelist_1935098904_1_1.html、获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量:[(MyAppDelegate*)[[UIApplicationsharedApplication] deleg... 阅读全文
posted @ 2014-11-20 02:23 lgphp 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量:[(MyAppDelegate*)[[UIApplicationsharedApplication] delegate] MyMethodOrMyVariable];2、获得程序的主Bundle:NSBundle *bund... 阅读全文
posted @ 2014-11-20 02:23 lgphp 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #import@interface ViewController : UIViewController@property (retain, nonatomic) IBOutlet UIImageView *imgV;- (IBAction)openCamera:(id)sender;- (IBAct... 阅读全文
posted @ 2014-11-20 02:21 lgphp 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 相册 iphone的相册包含摄像头胶卷+用户计算机同步的部分照片。用户可以通过UIImagePickerController类提供的交互对话框来从相册中选择图像。但是,注意:相册中的图片机器路径无法直接从应用程序访问,只能通过终端用户去选择和使用相册图片 应用程序包 应用程序包可能会将图像与... 阅读全文
posted @ 2014-11-20 02:19 lgphp 阅读(1752) 评论(0) 推荐(0) 编辑
摘要: AFNetwork是一个轻量级的网络请求api类库。是以NSURLConnection,NSOperation和其他方法为基础的。下面这个例子是用来处理json请求的:NSURL*url=[NSURLURLWithString:@"https://alpha-api.app.net/stream/0... 阅读全文
posted @ 2014-11-20 02:17 lgphp 阅读(2103) 评论(0) 推荐(0) 编辑
摘要: AFNetworking 初探繼ASIHTTPRequest發佈不再維護的訊息之後,如果我們不使用CDN(雲端伺服器),AFNetworking 會是一套不錯的選擇。下載網址:https://github.com/AFNetworking/AFNetworking下載之後,直接匯入Xcode的專案即... 阅读全文
posted @ 2014-11-20 02:07 lgphp 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Uiunderlinedbutton.h代码@interfaceUIUnderlinedButton:UIButton{}+(UIUnderlinedButton*)underlinedButton;@endUiunderlinedbutton.m代码@implementationUIUnderli... 阅读全文
posted @ 2014-11-20 01:32 lgphp 阅读(402) 评论(0) 推荐(0) 编辑
摘要: #import #import "ViewController.h"@interface ViewController ()@property(nonatomic, weak) IBOutlet UILabel *label1;@end@implementation ViewController- ... 阅读全文
posted @ 2014-11-20 01:22 lgphp 阅读(1569) 评论(0) 推荐(0) 编辑
摘要: OS 7:终于来了,TextKit。功能所以咱们到了。iOS7 带着 TextKit 登陆了。咱们看看它可以做什么!深入之前,我还想提一下,严格来说,这些事情中的大部分以前都可以做。如果你有大量的资源和时间来用CoreText构建一个文本引擎,这些都是可以做的。但是如果以前你想构建一个完善的富文本编... 阅读全文
posted @ 2014-11-20 01:09 lgphp 阅读(332) 评论(0) 推荐(0) 编辑
摘要: Textkit是iOS7新推出的类库,其实是在之前推出的CoreText上的封装,有了这个TextKit,以后不用再拿着CoreText来做累活了,根据苹果的说法,他们开发了两年多才完成,而且他们在开发时候也将表情混排作为一个使用案例进行研究,所以要实现表情混排将会非常容易。 TextKit并没有... 阅读全文
posted @ 2014-11-20 01:04 lgphp 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 图形用户界面中的图形有两种实现方式,一种是用代码画出来,比如Quartz 2D技术,狠一点有OpenGL ES,另一种则是使用图片。代码画的方式比较耗费程序员脑力,CPU或GPU; 图片则耗费磁盘空间,会增加app的体积.一般的app我们会偏重于使用图片来构建用户界面.设计师一般会使用PS来设计界面... 阅读全文
posted @ 2014-11-20 00:53 lgphp 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1。让类继承UITextViewDelegateUITextView *inputTextView;UIScrollView * _scrollView;2。在init函数中先创建scrollView_scrollView = [[UIScrollView alloc] initWithFrame:... 阅读全文
posted @ 2014-11-20 00:51 lgphp 阅读(649) 评论(0) 推荐(0) 编辑
摘要: 截取部分图片这么简单:- (void)loadView { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnimationSlide]; UIImage *image=[UII... 阅读全文
posted @ 2014-11-20 00:48 lgphp 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 在网上发现很多人使用 CGContextDrawImage(context,CGRectMake(0,0,self.width,self.height),[image CGImage]); //原图 CGContextDrawImage(context,rect,[mask CGImage]); /... 阅读全文
posted @ 2014-11-20 00:46 lgphp 阅读(1100) 评论(0) 推荐(0) 编辑
摘要: iOS界面设计切图小结APR 12TH, 20131.基本尺寸(1)界面实际设计时按:iPhone4、4s:640px*960pxiPhone5: 640px*1136pxiPad:1536px*2048px(2) 图标:1024px*1024px 圆角180px提交1024px*1024px 方角... 阅读全文
posted @ 2014-11-20 00:44 lgphp 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: 最近在做一个跟微博相关的应用。其中涉及到了对微博中@、##以及URL链接的解析与展示。分享一下个人处理的方式,希望对需要的人有所帮助。最终的展现效果: 首先,第一步是你得从纯文本中找到它们。毫无疑问,采用正则表达式匹配是最佳的方式。我采用的是RegexKitLite库。解析这三种格式的正则表达式... 阅读全文
posted @ 2014-11-20 00:35 lgphp 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 元素控件尺寸(pts)Window(含状态栏)320 x 480Status Bar的高度20Navigation Bar的高度44含Prompt的Navigation Bar的高度74Navigation Bar的图标20×20(透明的png)Tool Bar的高度44Tool Bar的图标20×... 阅读全文
posted @ 2014-11-20 00:21 lgphp 阅读(195) 评论(0) 推荐(0) 编辑
摘要: //NSString .... NSString *str1 = @"str1"; NSLog(@"str %@",str1); //NSArray NSArray *arr1 = @[@"one",@"two",@"three",@"four",@YES,@... 阅读全文
posted @ 2014-11-20 00:17 lgphp 阅读(276) 评论(0) 推荐(0) 编辑
摘要: http://www.swiftkiller.com/?p=371http://blog.csdn.net/javayujiafeng/article/details/14163319http://www.cocoachina.com/bbs/thread.php?fid-19.htmlhttp:/... 阅读全文
posted @ 2014-11-20 00:15 lgphp 阅读(134) 评论(0) 推荐(0) 编辑
摘要: UIImageView *imgvPhoto = [UIImageView alloc] init];//添加边框 CALayer *layer = [_imgvPhoto layer]; layer.borderColor = [[UIColor whiteColor] CGColor... 阅读全文
posted @ 2014-11-20 00:07 lgphp 阅读(933) 评论(0) 推荐(0) 编辑