Programming/Swift

xib와 xib간의 이동

ilovecoffee 2015. 5. 4. 19:27

xib와 swift가 연결되었을 때 스토리보드로 만들지않아 난감한 경우가 있다.

이럴 때 코드에 

    parentNavigationController!.pushViewController(MoreShopViewController(), animated: true

요걸 써주면 된다.


MoreShopViewcontroller은 개인적으로 만든 xib와 swift


@IBAction이나 tableview, didselectrowAtIndexPath에서 써주면된다.