ios - Custom View AddSubview programmatically, not shown UIElements… -
i add subview storyboard, subview viewcontroller own class. (tomstatusbarcontroller) ...it set customclass in storyboard. constraints layoutformats. works fine, statusbar red , see no uielements. lots on constraints warnings worked before, when had iboutlet, have change now.
-(void)viewdidload { [super viewdidload]; if (self) { self.tomcapturestatus = [[tomstatusbarcontroller alloc] initwithframe:cgrectmake(0, 0, 375, 78)]; self.tomcapturestatus.layer.bounds = cgrectmake(0, 0, 375, 78); self.tomcapturestatus.autoresizingmask = uiviewautoresizingflexiblewidth |uiviewautoresizingflexibleheight; self.view.translatesautoresizingmaskintoconstraints = yes; self.tomcapturestatus.backgroundcolor = [uicolor redcolor]; [self.view addsubview:self.tomcapturestatus]; [self.view superview]; } }
so why don't see thing, expect backgroundcolor?
tom
Comments
Post a Comment