
swift
那年高三今日尝
要结婚了,就要 有大人的 样子; 以前错过的时光,现在要补上; 晚上学习java,swift,oc语法; 早上看IOS开发; 以后多写日志,多写心得
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
swift UILabel
/* 1. 创建UILabel */ let label =UILabel() label.text ="hello world" label.center =view.center label.bounds =CGRect.init(origin:CGPoint.zero, size:CGSize.i原创 2016-12-21 10:27:43 · 370 阅读 · 0 评论 -
swift UIPickView
/* swift 3.0 UIPickView的使用 */ let pickView =UIPickerView() pickView.dataSource =self pickView.delegate =self pickView.showsSelectionIn原创 2016-12-23 13:49:05 · 579 阅读 · 0 评论 -
swift UISlider
/* swift 3.0 UISlider的使用 UISlider 也具有默认的高宽,宽度可以改变,高度设置无效 UISlider的 minimumValue,maximumValue可以设置任意值,只要min即可 */ let slider =原创 2016-12-23 11:17:04 · 355 阅读 · 0 评论 -
swift UIProgressView
/* swift 3.0 UIProgressView的使用 创建UIProgressView ,自身带有高宽, 直接设置高度无法改变 */ let progressView = UIProgressView.init(progressViewStyle: .default) progressView.center =原创 2016-12-23 10:59:39 · 507 阅读 · 0 评论 -
swift UIImageView
/* swift 3.0 UIImageView的使用 */ var imageView =UIImageView.init(image:UIImage.init(named:"a.png")) imageView.center =view.center view.addSubview(ima原创 2016-12-23 10:42:45 · 1007 阅读 · 0 评论 -
swift UISegmentedControl
发现不是很好用,因为有时候需要图片和文字同时存在,所以一般还是自定义了 /* swift 3.0 UISegmentedControl的使用 1. 创建UISegmentedControl (不仅可以是文字,而且可以是图片) 2. 设置的图片被重新渲染,所以withRenderingMode(.alwaysO原创 2016-12-23 10:09:17 · 1551 阅读 · 0 评论 -
swift UISwitch
/* swift 3.0 UISwitch的使用 */ /* 创建UISwitch UISwitch具有默认的高宽,所以只要设置位置就可以了; */ let uiswitch:UISwitch =UISwitch()原创 2016-12-23 09:29:54 · 459 阅读 · 0 评论 -
swift UITextView
/* swift 3.0 UITextField的使用 */ /* 1. 创建UITextField */ let textView =UITextView.init(frame:CGRect.init(x:0, y: 0, width:200, height: 200)) textView.cent原创 2016-12-22 13:21:06 · 388 阅读 · 0 评论 -
swift UITextField
/* swift 3.0 UITextField的使用 */ /* 1. 创建UITextField 2. 设置边框样式 borderStyle .none 无边框 .line 直线边框 .roundedR原创 2016-12-22 10:57:17 · 748 阅读 · 0 评论 -
swift UIButton
/* swift3.0 UIButton用法 */ /* 1. 创建button的几种类型 (1)UIButtonType.system: 前面不带图标,默认文字颜色为蓝色,触摸有高亮效果 (2)UIButtonType.custom: 定制按钮,前面不带图片,默认文字颜色为白色,无触摸时的高亮效果 (3)UIB原创 2016-12-21 14:08:09 · 751 阅读 · 0 评论 -
swift 拨打电话
UIApplication.shared.openURL(NSURL(string :"tel://123456")!as URL)原创 2016-12-21 14:00:01 · 515 阅读 · 0 评论 -
swift 网络端的缓存思想
/* 网络请求数据的缓存策略 *//* 简单缓存思想1 ->有网络情形:从网络中更新数据且进行缓存; ->无网络情形:直接从缓存中取出; *//* 简单缓存思想2(1) 什么是“Last-Modified”? 请求资源文件的最后修改时间 在浏览器第一次请求某个url原创 2016-12-26 09:51:19 · 974 阅读 · 0 评论