我嘗試在UIViewController
添加UIView
:AddSubView上的UITabBarController
AppDelegate *md = (AppDelegate*)[[UIApplication sharedApplication] delegate];
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 150, 44)];
[view setBackgroundColor:[UIColor yellowColor]];
[md.tab.view addSubview:view];
我注意到了UIView不是從開始:
我上創建的MainWindow.xib
只需將視圖與Y = 20 – CarlJ