I will show a UITextView with all messages from the NSLog in my debug mode program. It work, but my problem is: I have to show it all times. So, how can I make my view to be showing all time in my program, look like the Status Bar?
Asked
Active
Viewed 756 times
1 Answers
2
In your didFinishLaunchingWithOptions
set the following
//Add the textView to the rootviewcontroller view
UITextView *textView = [[UITextView alloc] init];
textView.frame = CGRectMake(0, 20, 320, 40);
[self.window.rootViewController.view addSubview:textView];

Omar Abdelhafith
- 21,163
- 5
- 52
- 56
-
great!! This is my mistake: rootViewController!!! I don't use it. I just get the top UIWindow but have to get the rootViewController. Thanks. – Rodrigo Jun 11 '12 at 21:34
-
This doesn't work if a modal view controller is being presented. – Vladimir Obrizan Apr 09 '13 at 20:01