- 博客(15)
- 收藏
- 关注
原创 iOS App集成Apple Pay 编程指南(中国版)
文章将描述如何在iOS App中开发支持中国用户的Apple Pay,包括前后端的一些处理逻辑如支付信息解密。关于Apple Pay的一些基本认识和相应API,具体可以参照Apple Pay官方文档,这里不多说。Apple Pay近期才引入中国,并针对中国增加了一些接口,如使用银联卡。这些接口在iOS9.2系统中,因此要开发此功能请先准备Xcode7.2或以上、iPhone真机iOS9.2
2016-02-18 17:34:25
2159
原创 获取系统当前的时间戳
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; NSTimeInterval a=[dat timeIntervalSince1970]; NSString *timeString = [NSString stringWithFormat:@"%.0f", a];//转为字符型 NSLog(@"timeStri
2015-11-30 17:13:09
475
原创 iOS 跳转到系统的wifi or 设置界面
1跳转到自己的项目中在需要调转的按钮动作中添加如下的代码,就会跳转到设置中自己的app的设置界面,这里会有通知和位置权限的设置NSURL * url = [NSURLURLWithString:UIApplicationOpenSettingsURLString];if([[UIApplicationsharedApplication] canOpenURL:url]) {NSURL*url
2015-11-25 10:48:55
1446
原创 iOS 将相册中的图片上传至服务器
- //从相册中选取图片或拍照- - (void)btnActionForEditPortrait:(id) sender {- UIImagePickerController *picker = [[UIImagePickerController alloc] init];- picker.delegate = self;- picker.sourceType =
2015-11-23 16:16:59
349
原创 上传头像
- (void)viewDidLoad { [super viewDidLoad]; DatePicker.backgroundColor=[UIColor whiteColor]; NSString * pathStr = [[self documentFolderPath]stringByAppendingString:@"/handfaceImage.png"];
2015-11-23 16:16:00
281
原创 iOSCoreData数据库:
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;//操作管理器(增删改查)@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;//被管理的数据模型@property
2015-11-18 18:02:05
382
原创 TextView TextField 上滑键盘
#pragma mark - 上滑键盘-(BOOL)textViewShouldBeginEditing:(UITextView *)textView{ CGFloat offset = self.view.frame.size.height-(sayTextView.frame.origin.y+sayTextView.frame.size.height+216); if (o
2015-11-18 18:00:07
301
原创 iOS 图片 按钮 切圆角
handImgView.layer.masksToBounds=YES; handImgView.layer.cornerRadius = 32.0f;button.layer.cornerRadius = 50.0f; //设置边框宽度 button.layer.borderWidth = 4.0f; //设置边框颜色 button.layer.bord
2015-11-18 17:58:37
1465
原创 xcode插件管理器
http://alcatraz.io 是插件管理器的网站,很好用,所有插件都可以在里面下载 更新 禁用http://github.so/XAlign/:自动对齐代码,快捷键:Shift+Command+X
2015-11-17 10:47:01
397
原创 iOS 钥匙串保存UUID
KeychainItemWrapper * wrapper = [[KeychainItemWrapper alloc]initWithIdentifier:@"AACCA" accessGroup:nil]; id kUsernameKey = (__bridge id)kSecAttrAccount; id kPasswordKey = (__bridge id)kSecVal
2015-11-17 10:44:59
472
原创 iOS iPhoneApp发布需关闭横屏
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskPortrait;}iPhone 关闭横屏。
2015-11-17 10:43:44
332
转载 HTTPS请求与HTTP兼容
今天升级Xcode 7.0 bata发现网络访问失败。输出错误信息The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.Google后查证,iOS9引入了新特性App Transport Secur
2015-11-17 10:38:33
6322
转载 ios url缓存策略——NSURLCache、 NSURLRequest
一:url 缓存策略 NSURLRequest requestWithURL:cachePolicy:timeoutInterval: 1:NSURLRequestUseProtocolCachePolicyThis flag will use the underlying protocol’s
2015-11-17 10:31:50
305
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人