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

objective-c 628

#Objective-C
用CATextLayer来实现一个UILabel

CATextLayer *textLayer = [CATextLayerlayer]; textLayer.frame =CGRectMake(100,100,100,100);…

2015-06-28 1,003

#Objective-C
IOS实现微信支付流程

1.注册微信开发账号,开通支付权限(注册谁都会了) 2.把三个文件拉进去 libWeChatSDK.a WXApi.h WXApiObject.h 3.添加URL Types 4.…

2015-06-28 603

#Objective-C
利用UIWebView显示gif

NSString *path = [[NSBundle mainBundle] pathForResource:@"3" ofType:@"gif&q…

2015-06-28 756

#Objective-C
iOS翻牌效果

- (IBAction)rotate:(id)sender { [UIView beginAnimations:@"View Filp" context:nil…

2015-06-28 626

#Objective-C
iOS 获取手机存储空间的大小

@import Darwin.sys.mount; int main(int argc, char * argv[]) { @autoreleasepool { struct st…

2015-06-28 970

#Objective-C
给UILabel添加删除线

let attributedText = NSAttributedString(string: "道之不存,师之所存也", attributes: [NSStr…

2015-06-28 790

#Objective-C
iOS打开相机的闪光灯

- (IBAction)openFlash:(id)sender { AVCaptureDevice *device = [AVCaptureDevice defaultDevic…

2015-06-28 1,011

#Objective-C
利用AVFoundation实现Blink拍照和录像的功能

github代码 前几天偶然发现一个app叫Blink,闲来无事,纯当练手,于是就尝试下自己实现它的功能. 页面都挺简单的 1.打开相机 – (void)openCam…

2015-06-28 220

#Objective-C
iOS 创建文件夹,删除文件夹,对文件夹重命名的操作

+ (void)createFolder:(NSString *)folderName { NSString *imageDir = [NSString stringWithFor…

2015-06-28 856

#Objective-C
ios9中 UIStackView的使用

UIStackView可以垂直或水平排布多个subview, 自动为每个subview创建和添加Auto Layout constraints. 1.添加subview let l…

2015-06-28 960

#Objective-C
ios输入地址得出经纬度

CLGeocoder *myGeocoder = [[CLGeocoder alloc] init]; [myGeocoder geocodeAddressString:_sear…

2015-06-28 845

#Objective-C
ios中做出颜色渐变的效果

CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.frame = self.view.bounds; gr…

2015-06-28 827
1 18 19 20 21 22 53