분류 전체보기76 버튼 이벤트 다른 컨트롤러의 func 불러오기 기본적으로 버튼 이벤트를 호출할때vNewComics.btnMore.addTarget(self, action: #selector(onTabBarChange), for: .touchUpInside) 이런식으로 호출한다. 근데 다른 컨트롤러의 func를 호출한다면 vNewComics.btnMore.addTarget(nil, action: #selector(HomeVC().onTabBarChange), for: .touchUpInside) 이런식으로 해야 한다! self -> nil로!func 는 Controller().func으로! 2016. 10. 21. UItableView 회전 tableviewName.transform = CGAffineTransform(rotationAngle: -(CGFloat)(M_PI_2)) 이런식으로 쓰면 된다 2016. 10. 14. [Swift]UIGestureRecognizer 참고자료 http://minsone.github.io/mac/ios/uigesturerecognizer 참고하여 나는 이런식으로 썼다! override func viewDidLoad() { super.viewDidLoad() initUi() let swipeUp = UISwipeGestureRecognizer(target: self, action: #selector(self.didSwipe(swipeGes:))) let swipeDown = UISwipeGestureRecognizer(target: self, action: #selector(self.didSwipe(swipeGes:))) swipeUp.direction = .up swipeDown.direction = .down self.view.gestureR.. 2016. 9. 28. swift3 numberOfSectionsInTableView swift 2.3 >> override func numberOfSectionsInTableView(tableView: UITableView) -> Int swift 3.0 >> override func numberOfSections(in tableView: UITableView) -> Int 원래 사용하던 swift 2.3 버전에서 개발을 계속하다가iOS 10이 출시되면서 xcode를 8로 업그레이드를 했다 하고 나니 어머나 문법이 왤케 많이 달라졌지?!ㅠㅠ그중 하나 고생한게 numberOfSectionsInTableView 이다.. 중간중간 비슷하지만 살짝살짝씩 다른게 있으니 주의할것!! 2016. 9. 19. Loaded nib but the view outlet was not set 오류 해결법 1. files owner와 제대로 연결되었는지 확인할 것 (이름 확인!!)2. view를 연결시켜줄것!! You guys are right, but as I'm a newcomer it took me a little while to figure out all the steps to do that. Here's what worked for me:Open the XIB file causing problemsClick on file's owner icon on the left bar (top one, looks like a yellow outlined box)If you don't see the right-hand sidebar, click on the third icon above "view" in you.. 2016. 9. 19. 이전 1 ··· 10 11 12 13 14 15 16 다음 반응형