I have an UIScrollView subclass defined in an external framework. If I create instances of this class in code, it works as expected. If I try to set this class as a custom class on an UIScrollView in Scoryboard, it's not listed in available custom classes. If I set it, when I check the object's class it's an UIScrollView (so it doesn't allow to call methods of the subclass).
This happens in a Swift 2.0 project targetting iOS 8.1 (Xcode7) The framework is using Swift 2.0 too and targetting iOS 8.0 The framework is included manually in the project (copy paste + add to Embedded Binaries)
Hope it's clear enough :D
Open Xcode ▸ File ▸ New ▸ File ▸ Cocoa Touch class ▸ Add your class name ▸ Select UIView or subclass of UIView under Subclass of ▸ Select language ▸ Next ▸ Select target ▸ Create the source file under your project directory. Programatically create subviews, layout and design your custom view as per requirement.
The UIView class is a concrete class that you can instantiate and use to display a fixed background color. You can also subclass it to draw more sophisticated content.
A uiview is a viewport component provided by UI-Router. When a state is activated, the state's view (component) is rendered into the appropriate uiview viewport. When an app renders a uiview , it becomes a viewport for views (components) to be loaded into.
You must specify a module together with class.
In this example we use class MyCustomScrollView
from the framework MyScrollViews.framework
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With