Wednesday, 15 January 2014

osx - Adding custom nsview -



osx - Adding custom nsview -

in mac os x i'm trying add together custom nsview view controller (i'm using storyboard)

that's how create view class:

@interface card1view : nsview @end

and .m file:

@implementation card1view

-(instancetype)initwithframe:(nsrect)frame { self = [super initwithframe:frame]; if (self) { [[nsbundle mainbundle] loadnibnamed:@"card1view" owner:nil toplevelobjects:nil]; } homecoming self; } @end

to add together view i'm using

nsview *view = [cardsprovider getcard:self.uxcardsview.frame]; [self.uxcardsview addsubview:view];

but doesn't work, tried modifications without success. ideas doing wrong?

please seek move loading nib code within viewdidload phone call of nsviewcontroller.

osx nsview osx-yosemite

No comments:

Post a Comment