iPhone의 상태 표시 줄에 버튼이나 사용자 정의보기를 추가하고 싶습니다.상태 표시 줄에 단추 또는보기를 추가하려면 어떻게합니까?
상태 표시 줄을 사용자 정의 할 수없는 경우에는 상태 표시 줄에 단추를 추가하거나 볼 수있는 것보다 ...
저와 함께 공유 해주시기 바랍니다.
감사합니다,
iPhone의 상태 표시 줄에 버튼이나 사용자 정의보기를 추가하고 싶습니다.상태 표시 줄에 단추 또는보기를 추가하려면 어떻게합니까?
상태 표시 줄을 사용자 정의 할 수없는 경우에는 상태 표시 줄에 단추를 추가하거나 볼 수있는 것보다 ...
저와 함께 공유 해주시기 바랍니다.
감사합니다,
[[UIApplication sharedApplication]setStatusBarHidden:YES withAnimation:NO];
// Create window
UIWindow *statusWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0,0,320,20)];
statusWindow.windowLevel = UIWindowLevelStatusBar;
statusWindow.backgroundColor=[UIColor redColor];
// Dont make the statusWindow keyWindow or the keyboard won't work!
// [statusWindow makeKeyAndVisible];
// Create statusBarButton
UIButton *statusBarButton = [UIButton buttonWithType:UIButtonTypeContactAdd];
statusBarButton.frame = CGRectMake(230, 2, 15, 15);
statusBarButton.backgroundColor=[UIColor redColor];
[statusBarButton addTarget:self action:@selector(goTop) forControlEvents:UIControlEventTouchUpInside];
// Place button into the new window
// Instead, add this:
[self.window makeKeyAndVisible]; // has to be main window of app
statusWindow.hidden = NO;
[statusWindow addSubview:statusBarButton];
UIWindow *statusWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0,0,320,20)];
statusWindow.windowLevel = UIWindowLevelStatusBar;
statusWindow.backgroundColor=[UIColor redColor];
내가 하나라도 그것은 또한 –
이 SO 게시물에 당신을 도울 수 나에게 완전한 도움이 될 것입니다 응답 좋은 아이디어 http://stackoverflow.com/questions/2833724/adding-view -on-statusbar-in-iphone – Maulik
고마워 Maulik ... 나는 그것을 원해. .. :) – Raj