ariok / BWWalkthrough

BWWalkthrough is a simple library that helps you build custom walkthroughs for your iOS App
MIT License
2.76k stars 245 forks source link

[Question] @IBInspectable properties? #1

Closed justinmakaila closed 9 years ago

justinmakaila commented 9 years ago

Wouldn't marking the properties in BWWalkthroughPageViewController as @IBInspectable make them easier to modify with IB/Storyboards?

ariok commented 9 years ago

Yes it would be great! but I'm pretty sure IBInspectable and IBDesignable cannot be applied to UIViewController subclasses :( only to UIView subclasses. Am I wrong?

justinmakaila commented 9 years ago

If you mark a UIViewController subclass as @IBDesignable, you can also mark properties as @IBInspectable and modify them within a UIStoryboard or .xib

ariok commented 9 years ago

The documentation says that you can mark only Classes inherited from UIView. https://developer.apple.com/library/prerelease/mac/documentation/Swift/Conceptual/BuildingCocoaApps/WritingSwiftClassesWithObjective-CBehavior.html#//apple_ref/doc/uid/TP40014216-CH5-XID_60

But I give a try anyway :+1:

ariok commented 9 years ago

You are right :+1: I can mark UIViewController properties as IBInspectable. I'll update the BWWAlkthroughPageViewController class! Thank you