Programming(133)
-
다른 class에서 struct값 가져올때..
* Send class SendClass { struct sendStruct { var name: String var age: String } var sendArray = [sendStruct]() func SendFunction() -> Array { return sendArray } } * Receiveclass RecevieClass { struct ReceiveStruct { var name: String var age: String } var ReceiveArray: Array = [ReceiveStruct]() let Send = SendClass() ReceiveArray = Send.SendFunction().map { ReceiveStruct(name: $0.name, age: $0.ag..
2016.08.04 -
특정 문자에 대한 분할(componentsSeparatedByString)
let str = "man|17&woman|19" let result = str.componentsSeparatedByString("&")print(result) // ["man|17", "woman|19] let charSet = NSCharacterSet(charactersInString: "|^")let result = str.componentsSeparatedByCharactersInSet(charSet)print(result) // ["man","17","woman","19"] let Array2D = str.componentsSeparatedByString("^").map { $0.componentsSeparatedByString("|")} print(Array2D) // [["man,"17"..
2016.08.03 -
[ERROR] pod install 시 Unable to satisfy the following requirements
$ pod install Analyzing dependencies[!] Unable to satisfy the following requirements: - `SQLite.swift (~> 0.10.1)` required by `Podfile` None of your spec sources contain a spec satisfying the dependency: `SQLite.swift (~> 0.10.1)`. You have either: * out-of-date source repos which you can update with `pod repo update`. * mistyped the name or version. * not added the source repo that hosts the P..
2016.08.01 -
Struct
struct InfoStruct { var NO: String var MenuItemName: String var MenuItemFamily: String var MenuImage: UIImage var PhoneNumber: String } var InfoArray = [InfoStruct]() InfoArray.append(InfoStruct(NO: user[no], MenuItemName: user[firstname], MenuItemFamily: user[lastname], MenuImage: user.get(userimage), PhoneNumber: user[phonenumber])) //let indexNo = NO.indexOf(NumberID) let indexNo = InfoArray...
2016.07.20 -
How to kill your app when it enters background mode
http://pinkstone.co.uk/how-to-kill-your-app-when-it-enters-background-mode/ 홈버튼을 눌러 백그라운드로 갔을 경우 앱을 실행시키지 않는다. 다시 실행하면 앱은 사용했던 화면을 보여주지 않고 새로 시작된다.
2016.07.15 -
navigation bar 배경색상 조절
let nav = self.navigationController?.navigationBar nav?.barTintColor = UIColor(red: 237.0/255.0, green: 237.0/255.0, blue: 242.0/255.0, alpha: 1.0) nav?.tintColor = UIColor(red: 0/255.0, green: 123.0/255.0, blue: 255.0/255.0, alpha: 1.0) nav?.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.blackColor()]
2016.07.06