storyboard - How to Assign a class to a custom UIView in Swift? -


I am trying to create a custom framework so that I can use the @IB design to present my view in the storyboard Can I Generally you can click on the view of the storyboard and select a class from the drop-down in the inspector since I will have to assign my custom framework by hanging, now I can create a custom subview within my framework And to have my class allocated is also that (which is a square from the graphical cycle counter downloaded from cocoapods JWGCircleCounter ..) How do I do this in Swift XCode 6 Yak There is no code here for my custom framework:

  Import UIKit @IBDesignable square CircleTimer: UIView {Override Work Layouts SubViews () {SuperLatesBuivius () var Outer Circle = Uviqualor ( JWGCrackQuent) (frame CGRactam: 22, 137, 125, 125) // How can I decide how to assign a square, I'm not even sure about reducing the frame after specifying the T work. / Code>   

You have code> JWGCircleCounter as JWGCircleCounter UIView . As should be made of intializer init (frame: CGRect). You can call this to create an example

In addition to fast

circle CircleTimer: UIView {Override function layoutSubviews () {OuterCircle at Super.layoutSubviews (): JWGCircleCounter = JWGCircleCounter (frame: CGRectMake (22, 137, 125, 125)) // How to assign a square to my estimate, of course it does not work is. I am also sure that where class self.addSubview is not to delicate the frame (outerCircle)}

JWGCircleCounter subclass of after the UIView and override it already in init (frame :) so that you can ask to make it an example.

And note that you do not always have the exact opposite of sub class ( JWGCircleCounter ) superclass ( UIView ).

Edit : You can try coco fond

Choose your project file (Blue on top right) and select Build Settings Go to . Then, for both project file (blue) and custom framework target, set 'Allow non-modular to include in Framework module' and set yes


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -