我是ios开发的新手.......
当我的应用程序运行时屏幕顶部会出现一个BAR .....其中包含
网络,数字时钟和电池符号
我怎么能这个酒吧呢? 提前谢谢.........
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
arryName = [[NSMutableArray alloc] initWithObjects:@"Savasana",@"Makarasana",@"Padahastasana",@"Natarajasana",@"Ustrasana",@"Hanumanasana",@"Garbhasana",@"Bhujapidasana",@"Astavakrasana(Eight-Angle Pose)",@"Mayurasana",@"Paschimottanasana",@"Janu Sirsasana",@"Urdhva Mukha Svanasana",@"Urdhva Dhanurasana",@"Bhujangasana",@"Bakasana",@"Surya Namaskar",@"Akarna Dhanur asana",@"Anjaneya asana",@"Ardha Chandra asana",@"Ardha Matsyendra asana",@"Baddha Kona Asana",@"Bala Asana",@"Chakra Asana",@"Dhanur asana",@"Ekapada asana",@"Garuda asana",@"Gomukha asana",@"Hala sana",@"Hasta Pada angusta",@"Matsya asana",@"Naga asana",@"Nataraja asana",@"Padma asana",@"Parivritta parshvakona",@"Pavana mukta asana",@"Sarvanga asana",@"Shalabha asana",@"Shava asana",@"Siddha asana",@"Simha asana",@"Sirsha asana",@"Tada asana",@"Trikona asana",@"Ugra asana",@"Ushtra asana",@"Vajra asana",@"Vira asana",@"Vriksha asana",@"Vrischika asana",@"Anjali Mudra",@"Ardha Matsyendrasana",nil];
arryImage = [[NSMutableArray alloc]initWithObjects:@"savasana_248.jpg",@"crocodile.jpg",@"Padahastasana.jpg",@"Natarajasana_248.jpg",@"Ustrasana_248.jpg",@"Hanumanasana_248.jpg",@"garbhasana.gif",@"bhujapidasana_1.jpg",@"Astavakrasana_248.jpg",@"Mayurasana.jpg",@"Paschimottanasa_248.jpg",@"JanuSirsasana.jpg",@"UrdhvaMukhaSvanasana.jpg",@"UrdhvaDhanurasana.jpg",@"Bhujangasana.jpg",@"Bakasana.jpg",@"1_Surya-namaskar.png",@"2-akarna_dhanurasana.png",@"3-Anjanya.png",@"4-ardha-chand.png",@"5-Adhamatsya.png",@"6-Baddha-kona.png",@"7-child-pose-balasana.png",@"8-Chakrasana-wheel-pose.png",@"9-Dhanura_asana-Bow_Pose.png",@"10-ekapada-asana-the-one-legged-pose.png",@"11-garudasana.png",@"12-gomukhasana.png",@"13-Halasan.png",@"14-Hasta.Padangusthasana.png",@"15-Matsyasana.png",@"16-naga-vj-g.png",@"17-natarajasana.png",@"18--padma.png",@"19--Parivrtta_Parsvakonasana-Revolved_Side_Angle_Pose.png",@"20-PAWANMUKTASANA.png",@"21-SHOULDER STAND.png",@"22--Salabhasana.png",@"23-Savasana.png",@"24-SIDDHASANA.png",@"25-Simha-asan-the lion.png",@"26-Sirsasana.png",@"27-Tada_Asana.png",@"28-Trikona_Asana.png",@"29-Ugra-asna-the Noblepose.png",@"30--ustrasana.png",@"31--Vijrasana.png",@"32-Vira-asna-the hero pose.png",@"33--Vriksha_Asana-Tree_Pose.png",@"34-VariskhikaiPad.png",@"AnjaliMudra.jpg",@"ArdhaMatsyendrasana.jpg",nil];
答案 0 :(得分:1)
在Project Info.plist文件集中,状态栏最初隐藏为YES,这将隐藏完整项目的状态栏。
如果你想隐藏状态栏,请特别查看
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:<#(UIStatusBarAnimation)#>];
答案 1 :(得分:0)
尝试以下代码
[[UIApplication sharedApplication] setStatusBarHidden:YES];
答案 2 :(得分:0)
它被称为“状态栏”。
您可以通过在“AppDelegate”中的“AppDidFinishLauching”方法中添加以下行来隐藏它:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
您也可以将其从.plist文件中隐藏。
干杯。
答案 3 :(得分:0)
在ProjectName-Info.plist
文件集Status bar is initially hidden
YES
否则使用[[UIApplication sharedApplication] setStatusBarHidden:YES];
答案 4 :(得分:0)
其被叫状态栏:
如果要隐藏状态栏,请在didFinishLaunchingWithOptions
方法AppDelegate
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
此代码隐藏状态bas with animation,如果要删除动画,请设置withAnimation:NO
在状态栏隐藏时自动设置viewController大小的另一种方法:
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
[UIView animateWithDuration:0.25 animations:^{
self.navigationController.navigationBar.frame = self.navigationController.navigationBar.bounds;
self.view.window.frame = CGRectMake(0, 0, appFrame.size.width, appFrame.size.height);
}];