我是GCD和线程的新手.我已经完成了教程并且非常困惑.有人可以用简单的话来解释.请不要建议苹果开发者链接..
提前致谢 !
iphone multithreading nsoperationqueue grand-central-dispatch nsinvocation
我需要为 iPhone 应用程序创建一个富文本编辑器(用于文本对齐、字体、粗体、斜体、下划线等)。我听说过将数据存储为 HTML 并将其呈现在 UIWebView 中。我想允许用户编辑数据,在我的应用程序中,我使用 TapDetectingWindow 来检测 UIWebView 上的触摸(完全如这里所述)。
- (id)init {
self = [super init];
if (self) {
tapDetectingWindow = (TapDetectingWindow *)[[UIApplication sharedApplication].windows objectAtIndex:0]; //mWindow, variable reference to TapDetectingWindow
tapDetectingWindow.viewToObserve = webView;
tapDetectingWindow.controllerThatObserves = self;
webView = [[UIWebView alloc] init];
[webView setFrame:CGRectMake(0, 0, 340, 1900)];
[webView setTag:1];
[webView addSubview:keyboardText];
[webView setDelegate:self];
[webView setOpaque:0.0];
[webView loadHTMLString:htmlString baseURL:NULL];
[self.view addSubview:webView];
keyboardText = [[UITextField alloc] init];
keyboardText.autocorrectionType = UITextAutocorrectionTypeNo;
[keyboardText setDelegate:self];
[self.view addSubview:keyboardText];
}
return self;
}
Run Code Online (Sandbox Code Playgroud)
但是我的应用程序崩溃了,并显示消息 …
任何人都可以解释我如何本地化iPhone应用程序?我对XCode本地化概念感到困惑.