OneGuyInDc
OneGuyInDc

Reputation: 1565

Override DrawRect for a UIView inside a UIViewController in a storyboard

I am using storyboards.

I have a UIViewController with a UIView

I want to do some custom drawing in the UIView

So I think I can create a IBOutlet for the UIView in my UIViewController class. Where do I put my code for overriding the drawRect for the UIView?

Upvotes: 0

Views: 743

Answers (1)

ksivamuthu
ksivamuthu

Reputation: 307

Create a subclass of UIView and implement drawRect method.

In storyboard, assign the subclass of the UIView in Class inspector of the control.

Upvotes: 1

Related Questions