摘要: 对视图直接设置alpha属性的值会导致其子控件也变得半透明,而通常我们的需求是:背景半透明而其子控件不透明。 一、 ImageView设置一张透明的图片。 二、使用colorWithWhite:alpha:方法 这是使用比较多的方法,white后面的参数表示灰度,从0-1之间表示从黑到白的变化,al 阅读全文
posted @ 2016-08-03 15:52 MaricoSun 阅读(2333) 评论(0) 推荐(0) 编辑
摘要: 用到的知识就是swift的闭包原理。 swift页面:返回的值是一个字典 在button点击的方法里面实现: 在需要实现闭包的方法: oc 页面: 在点击页面跳转的方法里面如下实现: 注意的是:这是由oc页面跳转到swift页面,反向传值。 阅读全文
posted @ 2016-07-27 21:25 MaricoSun 阅读(860) 评论(0) 推荐(0) 编辑
摘要: 一、UILabel 二、UIButton 三、UIImageView 代码地址:https://github.com/marico-sun/NDSwift.git 阅读全文
posted @ 2016-07-25 22:40 MaricoSun 阅读(2683) 评论(0) 推荐(0) 编辑
摘要: 一、 银联支付 本地没有其他的环境配置,只需要在支付时从服务器获取交易流水号(TN),然后调取支付控件,支付完成之后会通知商户后台以及客户端,,相关demo和SDK见官网。银联支付。 二、 微信支付 微信支付需要配置appkey,在app启动时注册appkey,例如(ios):BOOL value 阅读全文
posted @ 2016-07-18 16:07 MaricoSun 阅读(329) 评论(0) 推荐(0) 编辑
摘要: // // CommonMacroDefinition.h // LearnThread // // Created by Marico Sun in Beijing on 16/7/4. // Copyright © 2016年 QL. All rights reserved. // //判断是否 阅读全文
posted @ 2016-07-04 12:01 MaricoSun 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1 - (void)GCDMethed{ 2 // 后台执行 3 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ 4 5 // 后台执行的操作 6 NSLog(@"后台操作"); 7 }); 8 ... 阅读全文
posted @ 2016-07-01 14:35 MaricoSun 阅读(240) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': from Tkinter import * root = Tk() #Tk()是Tkinter库中的一个函数. root.title('什么鬼') canvas = Canvas(root, ... 阅读全文
posted @ 2016-05-05 17:58 MaricoSun 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 加入你只想输入字母,数字而不能输入汉字,如图: textfiled实现代码: 在代理方法中实现如下代码: 阅读全文
posted @ 2016-05-03 11:27 MaricoSun 阅读(2147) 评论(0) 推荐(0) 编辑
摘要: .h 文件 .m文件 阅读全文
posted @ 2016-04-28 17:35 MaricoSun 阅读(1776) 评论(1) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2015-09-15 11:32 MaricoSun 阅读(7) 评论(0) 推荐(0) 编辑