支付宝快速集成ios
摘要:看一下这篇文章,非常不错,并在此感谢这篇文章的作者。惯例,先写出嵌入支付宝的核心代码- (IBAction)payWithAli:(UIButton *)sender { //生成订单信息NSString *orderString=[AlipayRequestConfig genOrderWi...
阅读全文
posted @
2015-03-23 16:46
lgphp
阅读(324)
推荐(0) 编辑
IOS笔记 : 一些小技巧
摘要:计算单元格高度,在自定义cell中-(void) resizeTheHeight{ CGFloat contentWidth = 280; UIFont *font = [UIFont fontWithName:@"Arial" size:14]; CGSize s...
阅读全文
posted @
2015-01-31 10:15
lgphp
阅读(351)
推荐(0) 编辑
ios开发笔记
摘要:ios中相机全是英文怎么办在项目属性里info增加localizations 下面的item0 为简体中文即可APP 标题显示中文使用预处理文件
阅读全文
posted @
2015-01-14 17:42
lgphp
阅读(176)
推荐(0) 编辑
iOS开发:小技巧积累
摘要:1、获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量:[(MyAppDelegate*)[[UIApplicationsharedApplication] delegate] MyMethodOrMyVariable];2、获得程序的主Bundle:NSBundle *bund...
阅读全文
posted @
2014-11-20 02:23
lgphp
阅读(114)
推荐(0) 编辑
iOS开发:小技巧积累2
摘要:http://blog.sina.com.cn/s/articlelist_1935098904_1_1.html、获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量:[(MyAppDelegate*)[[UIApplicationsharedApplication] deleg...
阅读全文
posted @
2014-11-20 02:23
lgphp
阅读(126)
推荐(0) 编辑
IOS照相机的启动,图片的读取,存储demo
摘要:#import@interface ViewController : UIViewController@property (retain, nonatomic) IBOutlet UIImageView *imgV;- (IBAction)openCamera:(id)sender;- (IBAct...
阅读全文
posted @
2014-11-20 02:21
lgphp
阅读(281)
推荐(0) 编辑
ios中摄像头/相册获取图片,压缩图片,上传服务器方法总结
摘要:相册 iphone的相册包含摄像头胶卷+用户计算机同步的部分照片。用户可以通过UIImagePickerController类提供的交互对话框来从相册中选择图像。但是,注意:相册中的图片机器路径无法直接从应用程序访问,只能通过终端用户去选择和使用相册图片 应用程序包 应用程序包可能会将图像与...
阅读全文
posted @
2014-11-20 02:19
lgphp
阅读(1761)
推荐(0) 编辑
AFNetworking 使用总结 (用法+JSON解析
摘要:AFNetwork是一个轻量级的网络请求api类库。是以NSURLConnection,NSOperation和其他方法为基础的。下面这个例子是用来处理json请求的:NSURL*url=[NSURLURLWithString:@"https://alpha-api.app.net/stream/0...
阅读全文
posted @
2014-11-20 02:17
lgphp
阅读(2126)
推荐(0) 编辑
AFNetworking 初探
摘要:AFNetworking 初探繼ASIHTTPRequest發佈不再維護的訊息之後,如果我們不使用CDN(雲端伺服器),AFNetworking 會是一套不錯的選擇。下載網址:https://github.com/AFNetworking/AFNetworking下載之後,直接匯入Xcode的專案即...
阅读全文
posted @
2014-11-20 02:07
lgphp
阅读(231)
推荐(0) 编辑
iOS开发:自定义带下划线文本的UIButton
摘要:Uiunderlinedbutton.h代码@interfaceUIUnderlinedButton:UIButton{}+(UIUnderlinedButton*)underlinedButton;@endUiunderlinedbutton.m代码@implementationUIUnderli...
阅读全文
posted @
2014-11-20 01:32
lgphp
阅读(402)
推荐(0) 编辑
NSAttributedString能否设置文字下划线?是否支持line break?
摘要:#import #import "ViewController.h"@interface ViewController ()@property(nonatomic, weak) IBOutlet UILabel *label1;@end@implementation ViewController- ...
阅读全文
posted @
2014-11-20 01:22
lgphp
阅读(1597)
推荐(0) 编辑
iOS 7系列译文:认识 TextKit
摘要:OS 7:终于来了,TextKit。功能所以咱们到了。iOS7 带着 TextKit 登陆了。咱们看看它可以做什么!深入之前,我还想提一下,严格来说,这些事情中的大部分以前都可以做。如果你有大量的资源和时间来用CoreText构建一个文本引擎,这些都是可以做的。但是如果以前你想构建一个完善的富文本编...
阅读全文
posted @
2014-11-20 01:09
lgphp
阅读(338)
推荐(0) 编辑
用TextKit实现表情混排
摘要:Textkit是iOS7新推出的类库,其实是在之前推出的CoreText上的封装,有了这个TextKit,以后不用再拿着CoreText来做累活了,根据苹果的说法,他们开发了两年多才完成,而且他们在开发时候也将表情混排作为一个使用案例进行研究,所以要实现表情混排将会非常容易。 TextKit并没有...
阅读全文
posted @
2014-11-20 01:04
lgphp
阅读(462)
推荐(0) 编辑
iphone 弹出键盘,文本框自动向上移动。
摘要:1。让类继承UITextViewDelegateUITextView *inputTextView;UIScrollView * _scrollView;2。在init函数中先创建scrollView_scrollView = [[UIScrollView alloc] initWithFrame:...
阅读全文
posted @
2014-11-20 00:51
lgphp
阅读(652)
推荐(0) 编辑
IOS截取部分图片
摘要:截取部分图片这么简单:- (void)loadView { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation: UIStatusBarAnimationSlide]; UIImage *image=[UII...
阅读全文
posted @
2014-11-20 00:48
lgphp
阅读(385)
推荐(0) 编辑
IOS给图片增加水印(图片、文字)
摘要:在网上发现很多人使用 CGContextDrawImage(context,CGRectMake(0,0,self.width,self.height),[image CGImage]); //原图 CGContextDrawImage(context,rect,[mask CGImage]); /...
阅读全文
posted @
2014-11-20 00:46
lgphp
阅读(1110)
推荐(0) 编辑
iOS界面设计切图小结
摘要: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
阅读(1263)
推荐(0) 编辑
iOS解析新浪微博的@##以及URL链接并展示
摘要:最近在做一个跟微博相关的应用。其中涉及到了对微博中@、##以及URL链接的解析与展示。分享一下个人处理的方式,希望对需要的人有所帮助。最终的展现效果: 首先,第一步是你得从纯文本中找到它们。毫无疑问,采用正则表达式匹配是最佳的方式。我采用的是RegexKitLite库。解析这三种格式的正则表达式...
阅读全文
posted @
2014-11-20 00:35
lgphp
阅读(497)
推荐(0) 编辑
iOS常用控件尺寸大集合
摘要:元素控件尺寸(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
阅读(197)
推荐(0) 编辑
ios 几种快速写法
摘要://NSString .... NSString *str1 = @"str1"; NSLog(@"str %@",str1); //NSArray NSArray *arr1 = @[@"one",@"two",@"three",@"four",@YES,@...
阅读全文
posted @
2014-11-20 00:17
lgphp
阅读(279)
推荐(0) 编辑