RCIX
RCIX

Reputation: 39427

How do i subclass a UIView?

This may seem like a stupid question, but i can't quite remember how to subclass a UIView. Can anyone point me in the right direction?

Upvotes: 4

Views: 2990

Answers (1)

marcc
marcc

Reputation: 12399

example (.h file):

#import <UIKit/UIKit.h>

@interface MySubclassedView : UIView 
{

}

@end

Or, just add a new class to your project and tell XCode to subclass UIView and the template will be created.

Upvotes: 7

Related Questions