iOS9之后支付宝的回调以及iOS8之后提示框UIAlertController
来源:互联网 发布:电子网络发票系统下载 编辑:程序博客网 时间:2024/06/06 13:20
#pragma mark - UIApplicationDelegate-支付宝的回调
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullableNSString *)sourceApplication annotation:(id)annotationNS_DEPRECATED_IOS(4_2,9_0, "Please use application:openURL:options:"){
if ([url.hostisEqualToString:@"safepay"]) {//支付宝钱包
[[AlipaySDKdefaultService]
processOrderWithPaymentResult:url
standbyCallback:^(NSDictionary *resultDic) {
}];
}
// [[IFlySpeechUtility getUtility] handleOpenURL:url];
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*,id> *)options NS_AVAILABLE_IOS(9_0)
{
//////////////////////
if ([url.hostisEqualToString:@"safepay"]) {//支付宝钱包
[[AlipaySDKdefaultService]
processOrderWithPaymentResult:url
standbyCallback:^(NSDictionary *resultDic) {
}];
}
[[IFlySpeechUtilitygetUtility] handleOpenURL:url];
return YES;
//
if (IAIOS8)
{
UIAlertController *alertController = [UIAlertControlleralertControllerWithTitle:title message:messagepreferredStyle:UIAlertControllerStyleAlert];
if (self.tag == LEFT_ALERTMESSAGE)
{
NSArray *views = [selfviewArray:alertController.view];
UILabel *title = views[1];
title.textAlignment =NSTextAlignmentLeft;
[ToolsUtilsetAlertToolParagraph:title];
}
if(cancelButtonTitle != nil)
{
UIAlertAction *cancelAction = [UIAlertActionactionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancelhandler:^(UIAlertAction *action) {
TheAppDel.currAlertController =nil;
if (cancel)
{
cancel();
}
}];
[alertController addAction:cancelAction];
}
if (otherButtonTitle !=nil) {
UIAlertAction *otherAction = [UIAlertActionactionWithTitle:otherButtonTitle style:UIAlertActionStyleDefaulthandler:^(UIAlertAction *action) {
TheAppDel.currAlertController =nil;
if (confirm)
{
confirm();
}
}];
[alertController addAction:otherAction];
}
// Add the actions.
[viewController presentViewController:alertControlleranimated:YEScompletion:nil];
self.confirmParam=confirm;
self.cancelParam=cancel;
TheAppDel.currAlertController = alertController;
}
else
{
UIAlertView *alertView=[[UIAlertViewalloc]initWithTitle:titlemessage:message delegate:viewControllercancelButtonTitle:cancelButtonTitle otherButtonTitles:otherButtonTitle, nil];
[alertView show];
if (cancelButtonTitle==nil)
{
self.confirmParam=cancel;
self.cancelParam=confirm;
}else
{
self.confirmParam=confirm;
self.cancelParam=cancel;
}
TheAppDel.currAlertView = alertView;
}
- iOS9之后支付宝的回调以及iOS8之后提示框UIAlertController
- ios8之后的UIAlertController
- iOS8.0之后的UIAlertController
- ios8之后的UIAlertController详解
- iOS8之后UIAlertController
- IOS8 UIAlertController 提示框
- iOS8之后UIAlertView被弃用 UIAlertController成功上位
- iOS8之后的UIAlertViewController
- iOS -iOS9中提示框(UIAlertController)的常见使用
- 关于iOS9之后的loadViewIfNeeded
- iOS8中提示框的使用UIAlertController(UIAlertView和UIActionSheet)
- UIAlertController 9.0 之后使用
- 对话框视图UIAlertView,上拉菜单UIActionSheet,以及9.0之后完全取代他们的的UIAlertController
- iOS9 之后的UIAlertView 的写法
- iOS9 之后设置状态栏的颜色
- iOS9之后AFNetWorking的使用(详细)
- iOS9之后AFNetWorking的使用(详细)
- 关于ios8之后touch Id的问题
- SlidingMenu源码分析-附自定义底部滑出菜单控件
- gstreamer插件之 v4l2src
- MTF
- FMDB 数据库的基本写法
- KMP算法解析
- iOS9之后支付宝的回调以及iOS8之后提示框UIAlertController
- 终止继承:Final类和Final方法
- 程序编写规范、优化时使用的关键字含义
- 小程序:统计字符串出现的种类和频率
- ubuntu14.04 酷我音乐盒版本
- Python Tkinter Grid布局管理器详解
- 从零开始搭建架构实施Android项目
- 【百金轻】:“小涨”才露尖尖角 晚有“绿线”立上头
- react native之API学习