xcode4.3

get selected text from a uiwebview Xcode

蓝咒 提交于 2021-02-07 03:24:55
问题 I have a UIWebView that loads text from an htmlString . I need when the user selects a part of the text and presses a button, i will be capable of extracting it in order to use it elsewhere, so i am using this code : // The JS File NSString *filePath = [[NSBundle mainBundle] pathForResource:@"HighlightedString" ofType:@"js" inDirectory:@""]; NSData *fileData = [NSData dataWithContentsOfFile:filePath]; NSString *jsString = [[NSMutableString alloc] initWithData:fileData encoding

Strange error when running my project

故事扮演 提交于 2020-02-05 04:54:06
问题 When trying to run my project I get this error and I don´t know what it means : _OBJC_CLASS_$_MyWindowController", referenced from: objc-class-ref in AppDelegate. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What does it mean and how can I get rid of it? Any ideas? 回答1: Select the application target, go to the Build Phases tab and make sure MyWindowController.m is in Compile Sources , otherwise add it. Also, if

Formatting and Bullets in a TextBox in iOS5

独自空忆成欢 提交于 2020-02-05 04:37:28
问题 Does anyone know how to insert bullets and do some formatting in a textbox, maybe in a webview (as shown in the print screen below) in iOS 5, XCode 4.3? 回答1: For the UITextView manually add dots and newlines, for example: NSArray *items = [NSArray arrayWithObjects:@"Stack",@"Overflow",nil]; NSMutableString *formattedString = [[NSMutableString alloc] init ]; for (NSString *item in items) [formattedString appendFormat:@"\u2022 %@\n", item]; theTextViewName.text = formattedString; For the

Error during Xcode Component Installation

爷,独闯天下 提交于 2020-01-30 14:20:29
问题 I just installed a software update that I was prompted for, presumable affecting Xcode. Now when I start Xcode, I am presented with a dialog box which states that Xcode must install the Mobile Device Framework before continuing. When I try to do this, after providing my password, it fails with "An unknown error occurred. See the install log for more details." I do not see anything useful in install.log that identifies the problem. I've tried re-installing multiple times and rebooting to no

Core Data & UIManagedDocument in Xcode 4.3: Can't merge models

本秂侑毒 提交于 2020-01-24 12:05:48
问题 I'd like to thank all the people that contribute to this website. I am one h*ll of a noob at programming and you all help me out so much. With that said, let's get on with my latest problem! I am creating an app that uses a UIManagedDocument to store a Core Data model for me. I use to create the UIManagedDocument with the following code, but now with Xcode 4.3.2 (The one that updates with the Mac App Store) I have an issue. Here's the code: NSURL *url = [[[NSFileManager defaultManager]

xcode prompt file is locked for editing doesn't remember Unlock choice after choosing “Do not show this message again”

萝らか妹 提交于 2020-01-23 14:14:06
问题 If I start typing in a readonly file in Xcode for the first time, I get prompted with a dialog that basically says the file is locked for editing, and asks me if I want to unlock it. If I choose Unlock, I can continue editing the file. At one point, I got annoyed at this (as I will always want it to unlock), and so I clicked "Do not show this message again", with the expectation that it would remember my choice. However, while I no longer get prompted, it also does not unlock the files

xcode prompt file is locked for editing doesn't remember Unlock choice after choosing “Do not show this message again”

↘锁芯ラ 提交于 2020-01-23 14:14:00
问题 If I start typing in a readonly file in Xcode for the first time, I get prompted with a dialog that basically says the file is locked for editing, and asks me if I want to unlock it. If I choose Unlock, I can continue editing the file. At one point, I got annoyed at this (as I will always want it to unlock), and so I clicked "Do not show this message again", with the expectation that it would remember my choice. However, while I no longer get prompted, it also does not unlock the files

Ad Hoc Builds Crashing on Device Only - ASIHTTPRequest

一笑奈何 提交于 2020-01-15 12:38:05
问题 EDIT This problem is related to ASIHTTPRequest. When I remove the ASIHTTPRequest async block, the app does not crash on my device any more. I can run the ASIHTTPRequest code on my device, loaded from Xcode fine. It's just when I upload the archive from TestFlight and try to run it that it crashes. The device crash log shows: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000058 Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread

File's Owner Icon

坚强是说给别人听的谎言 提交于 2020-01-14 08:59:47
问题 I have spent way too much time looking for the files owner icon to click-drag to a text field to assign a variable to that field. Then it hit me that the icon only shows on nib files. Not storyboards. So what is the option to assign a variable to a text field, hard coding? What I am trying to do is show the continuous coords for current location in two text fields on my home screen and update as they move. I have all of that coding done just haven't been able to assign the variable to the

How to use “Custom Objects” in IB in XCode 4

允我心安 提交于 2020-01-11 12:19:35
问题 This is in Xcode 4 and it leads me to believe that I can create, and reuse, custom objects. However, I can not find any method of doing so. How do you use this? Does anyone know? 回答1: Short answer: you currently can't use the Custom Objects section to create custom objects. The Custom Objects section contains third-party Interface Builder elements. Older versions of Xcode and Interface Builder supported the creation of custom user interface elements. BWToolkit contains examples of custom