- Today
- 69
- Total
- 230,292
목록iOS-Develop(Swift) (42)
개발은 너무해
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { // you can also programmatically calculate a desired if(indexPath.section==0) { //첫번째 섹션 일때 return 80 // 셀 크기를 80으로 지정 } else { return 44 } return 0 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { cell.HomeMenuItemLabel.numberOfLines = 4;..
AppIcon 이미지를 넣어서 핸드폰에서 확인 하였을 때 아이콘 주위에 검은색 테두리가 생겼다. 해결 방법은 간단하다. 1. 적용한 원본 이미지를 자세히 보라.2. 확장자가 png인지 확인하여라3. 이미지 전체 사이즈 주위에 하얀색 테두리가 있지 않은지 보아라. 참고로 이미지를 만들때 테두리 곡선을 나타내기 위하여 하얀색 부분을 살짝 남기는 경우가 있는데,사각형으로 이미지 크기만큼 둘레를 전체 색칠 해주어라.걱정하지 않아도 되는 것이 아이폰에서 자동으로 곡선테두리가 생겨나기 때문이다.
let close : UIButton = (cell.viewWithTag(102) as! UIButton)
http://stackoverflow.com/questions/16427421/how-to-remove-cocoapods-from-a-projectDelete the standalone files (Podfile Podfile.lock and your Pods directory)Delete the generated xcworkspaceOpen your xcodeproj file, delete the references to Pods.xcconfig and libPods.a (in the Frameworks group)Under your Build Phases delete the Copy Pods Resources, Embed Pods Frameworks andCheck Pods Manifest.lock ..
/*SQLite*///로컬에서 데이터 저장경로//let db = try Connection("/Users/goodgods/Documents/development/MyApp/db.sqlite3") // Get document directory path from your phone -> 모바일에서 경로찾아 저장함let path = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as Stringdo { let db = try Connection("\(path)/db.sqlite3") let users = Table("users") let id = Expression("id") try db.run(users.cr..
Info.plist 아래와 같이 추가 해준다.
apple Developer 사이트에서 개발자 로그인 후에 다운로드한다. apple developer
- ERROR 관련(?) 은 swift 2.0부터 syntax 가 바뀜 * oldvar err: NSError?var myJSON = NSJSONSerialization.JSONObjectWithData(data, options: .MutableLeaves, error:&err) as? NSDictionaryif let parseJSON =myJSON {// Now we can access value of First Name by its keyvar firstNameValue = parseJSON[“firstName”] as? Stringprintln(“firstNameValue: \(firstNameValue)”)} * new(swift 2.0)do { if let parseJSON = try NSJS..
// playground 에서 아래 소스를 실행해 보자.1.//: Playground - noun: a place where people can playimport UIKit class ExamClass { deinit { print("deinit") }} 2.import UIKit var exam: ExamClass? = ExamClass()exam = nil for i in 0...10 { i * i} 3.import UIKitimport XCPlayground let circleRect = CGRectMake(0,0,300,300)class CircleView: UIView { override func drawRect(rect: CGRect) { let context:CGContextRef = UI..
제목 그대로, 시뮬레이션 할 때 키보드가 보여지지 않는 경우는 시뮬레이터 화면을 클릭하고 상단 메뉴에 Hardware 가 있다.Keyboard의 Toggle Software Keyboard 선택하면 된다. Hardware - Keyboard - Toggle Software Keyboard
버튼 삭제 후 에러 발생.libc++abi.dylib terminating with uncaught exception of type nsexception (lldb) http://stackoverflow.com/questions/26442414/libcabi-dylib-terminating-with-uncaught-exception-of-type-nsexception-lldb