Swift 3.0 Date的简单使用
////ViewController.swift//Date的使用////Created by 思 彭 on 16/9/20.//Copyright © 2016年 思 彭. All rights reserved.//import UIKitclass ViewController: UIViewController {override func viewDidLoad() {super.viewDidLoad()/// 1.获得当前的日期
0评论2023-02-09492
- Swift字符串操作-持续更新-2022 swift代码规则
0评论2023-02-09
OC & Swift中UITextFiled、UITextView限制输入字数
我是用通知实现的,首先添加UITextFiled和UITextView的接收中心 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textViewNotifitionAction:) name:UITextViewTextDidChangeNotification object:nil]; [[NSNotificationCenter de
0评论2023-02-09738
Swift - 界面的跳转模式
iOS开发中界面跳转有两种方式,上下跳转和左右跳转。上下跳转_TO: let secondViewController = SecondViewController() self.presentViewController(secondViewController, animated: true, completion: nil) 上下跳转_BACK:dismissViewC
0评论2023-02-09546
swift 注解 (和java比照)@attribute name
Attributes provide more information about a declaration or type. There are two kinds of attributes in Swift, those that apply to declarations and those that apply to types.You specify an attribute by writing the @ symbol followed by the
0评论2023-02-09338
swift 数据读写
//// DocumentActionViewController.swift// UIControlDemo//// Created by on 14/12/10.// Copyright (c) 2014年 马大哈. All rights reserved.// import UIKit class DocumentActionViewController: BaseViewController { override func
0评论2023-02-09582
swift 多线程的使用
尝试了下Swift3.0中GCD的延时函数与之前的有挺大的不同 - swift3.0中有4个延迟函数,如下public func asyncAfter(deadline: DispatchTime, qos: DispatchQoS = default, flags: DispatchWorkItemFlags = default, execute work: @escaping @convention(block)
0评论2023-02-09525
Swift: 属性
属性常与类、结构体、枚举联系在一起。stored properties存储常量值、变量值,而computed properties计算一个值。类、结构体、枚举都可以有computed property,但是只有类与结构体可以有stored property。Stored Propertiesstruct FixedLengthRange {var firs
0评论2023-02-09870
SWIFT中的repeat...while Swift中的类拷贝
SWIFT中的repeat...while类似于JAVA\.NET中的 do while.大同小异只是把do换成了repeatvar index = 10repeat{print(index)index--} while(index0)
0评论2023-02-09463
IOS学习之路——Swift语言(1)——基本类型、运算符与逻辑控制语句
本人以前一直都没接触过IOS开发。大概是从年初开始,因为兴趣爱好,在慕课网上学习了最早的swift1.0课程,最近慕课网上的swift课程更新到swift2.1版本了。最近本人的mac本xcode又升级到xcode8版本了,所以swift版本也就升级到3.0了。也是因为兴趣,所以打算好
0评论2023-02-09880
Swift 实现iOS Animation动画教程
这是一篇翻译文章。原文出处:http://www.raywenderlich.com/95910/uiview-animation-swift-tutorial 动画( animation)是iOS用户界面中非常重要的知识。动画可以吸引用户的注意力,使程序更加美观生动。 更值得注意的是,在扁平化设计时代,动画是让优秀
0评论2023-02-09456
Swift 里 Array (二)初始化
init() 函数在 Array 里public init() {_buffer = _Buffer()}以Buffer 是 _ContiguousArrayBuffer 为例。即初始化了一个_ContiguousArrayBuffer。在_ContiguousArrayBuffer里/// Create an empty buffer.@inlinableinternal init() {_storage = _emptyArraySt
0评论2023-02-09315
Swift - 滑块(UISlider)的用法
1,滑块的创建123456var slider=UISlider(frame:CGRectMake(0,0,300,50))slider.center=self.view.centerslider.minimumValue=0 //最小值slider.maximumValue=1 //最大值slider.value=0.5 //当前默认值self.view.addSubview(slider)2,设置滑块的值,同
0评论2023-02-09990
- iOS云存储:CloudKit 基本使用教程 增删改查(Swift)
0评论2023-02-09
swift3.0 原生网络请求
p.p1 { margin: 0; font: 18px Menlo }p.p2 { margin: 0; font: 18px Menlo; min-height: 21px }p.p3 { margin: 0; font: 18px Menlo; color: rgba(29, 148, 33, 1) }p.p4 { margin: 0; font: 18px Menlo; color: rgba(97, 34, 174, 1) }span.s1 { font-varia
0评论2023-02-09896
- Swift3 GCD队列优先级说明
0评论2023-02-09
- Swift服务的基本使用
0评论2023-02-09
swift 关闭打印print
import Foundation class DebugLogTool: NSObject { private static let isDebug = true /** * 自定义log打印 */ static func debugLog(item: Any){ if isDebug { print(item)
0评论2023-02-09461