Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Category: Swift

Swift, a new development language released by Apple at WWDC (Apple Developer Conference) in 2014, can run on Mac OS and iOS platforms together with Objective-C* to build applications based on the Apple platform. Swift is an easy-to-learn and easy-to-use programming language, and it is also the first system programming language with the same expressiveness and fun as a scripting language. Swift is designed with safety as the starting point to avoid various common programming error categories.

Array – Recourse in SWIFT

In Python, I can create a repeating list like this:

>>> [1,2,3 ]*3
[1, 2, 3, 1, 2, 3, 1, 2, 3] Is there a concise method in Swift?

The best thing I can do is:

1> var r = [Int]()
r

October 10, 2021By Simo Swift array, Medium, repetition, SWIFTLeave a Comment

Swift – weak self in Didset

I rarely see people using [weak self] in didSet. Is there a reason?

I tried to use [weak self] in the didSet of the variable:

var data: Dictionary! {// [1]
didSet {[2]
self?.layoutSub

October 10, 2021By Simo Swift Didset, Medium, Mi, Self, Weak, WeiLeave a Comment

Swift’s use of closed bag

The simplest way to write closures, here is the format {(parameters) -> return type in
statements
}
Examples

//let append = {(str1 aa:String ,Str2 bb: String)-> String in error, the c

October 10, 2021By Simo Swift closing, middle, SWIFT, usageLeave a Comment

SWIFT: How to use PreProcessor Flags to implement API keys?

In Objective-C, static string constants are sometimes used to define alternate API keys (for example, the RELEASE and DEBUG keys to distinguish analysis packages, such as MixPanel, Flurry or Crashl

October 10, 2021By Simo Swift API, Debug, Flags, How, key, Preprocessor, SWIFT, UsedLeave a Comment

SWIFT Basic Syntax – Data Type

Common Swift data types value type enum Optional structure (Struct) Bool, Int, Float, Double, Character String, Array, Dictionary, Set reference type class class

Sw The use of ift’s

October 10, 2021By Simo Swift data, foundation, SWIFT, Syntax, typeLeave a Comment

Quickly try question mark

I see the following in the code I maintain:

func parse(values: NSMutableDicationary) {
let data = try? JSONSerialization.data(withJSONObject: values, options: JSONSerialization.WritingOption

October 10, 2021By Simo Swift ask questions, Quick, tryLeave a Comment

Array – MAX and MIN in Float arrays in SWIFT

According to this answer, to get the maximum value of the array, we can do:

let nums = [1, 6, 3, 9, 4, 6];
let numMax = nums.reduce(Int.min, {max($0, $1) }) How do we do for Array< Float> The

October 10, 2021By Simo Swift max, MINLeave a Comment

SWIFT – Change the map type (mixed, satellite) by segmentation control

I am trying to use the segment control button to change the map type, I hope it can use 3 options to change the map type: standard, satellite and hybrid. So far, I have this code but Once a differe

October 10, 2021By Simo Swift change, control, Map, mix, pass, satellite, segmentation, SWIFT, typeLeave a Comment

swift – tvOS Button Action

I created a UIButton in tvOS via Swift

let randomBtn = UIButton()
randomBtn. setTitle(“Zufällig”, forState: .Normal)
let RndNormal = UIImage(named: “RndNormal”)
let RndHoover = UIImage(named:

October 10, 2021By Simo Swift action, button, SWIFT, TVOSLeave a Comment

Array – How do you write all strings in an array?

I have an array of strings, but all the jingle is written in uppercase letters. Is there a way for me to set all the strings in the array to lowercase (and use uppercase and lowercase) )

arra

October 10, 2021By Simo Swift all, array, How, Medium, string, uppercaseLeave a Comment

Posts navigation

Page 1 … Page 5 Page 6 Page 7 … Page 9
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress