top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In SWIFT how to add custom view in storyboard

+2 votes
775 views

I created custom view class.

import UIKit

class CustomView: UIView {

    init(frame: CGRect) {
        super.init(frame: frame)
        // Initialization code
    }

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect)
    {
        // Drawing code
    }
    */

}

But i don't know how to include created custom view in Storyboard because i heard that we can add custom views in storyboard design.

posted Aug 19, 2014 by Shiva

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

how to use reusable identifier for table view cell in SWIFT.
In Objective C:

static NSString *identifier = @"mainMenuCell";
    cell =[tableView dequeueReusableCellWithIdentifier:identifier];  

Then how it should be in SWIFT

+1 vote

How to use below code in swift.

[actionBtn addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
+1 vote

How to declare single parameter which accept multiple values.

+1 vote

How to use default values for parameter in function. What will happens when value is not passed for a default parameters.

0 votes

I am facing situation to use external parameter name to a function parameter name .. How to achieve this

...