我将在我的 Debug模式程序中显示一个 UITextView,其中包含来自 NSLog 的所有消息。它有效,但我的问题是:我必须一直展示它。那么,我怎样才能让我的 View 在我的程序中一直显示,看起来像状态栏?
最佳答案
在你的didFinishLaunchingWithOptions
设置如下
//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];
关于iphone - 如何将 UIView 始终放在顶部屏幕上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10987620/