2016. 7. 20. 15:48ㆍProgramming/Swift
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.indexOf { $0.NO == NumberID}
self.InfoArray[indexNo!] = InfoStruct(NO: self.NumberID, MenuItemName: contact.givenName, MenuItemFamily: contact.familyName, MenuImage: userImage, PhoneNumber: telephone)
InfoArray[indexPath.row].MenuItemFamily
'Programming > Swift' 카테고리의 다른 글
특정 문자에 대한 분할(componentsSeparatedByString) (0) | 2016.08.03 |
---|---|
[ERROR] pod install 시 Unable to satisfy the following requirements (0) | 2016.08.01 |
How to kill your app when it enters background mode (0) | 2016.07.15 |
navigation bar 배경색상 조절 (0) | 2016.07.06 |
tableView의 cell 안에 2줄이상 사용할 때 (0) | 2016.07.06 |