xcode4.3

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

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-11 12:19:07
问题 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

property x not found on object of type y

ぐ巨炮叔叔 提交于 2020-01-07 02:16:23
问题 Newbie here, working on a programmable calculator. In the interface of the model class CalculatorBrain , I declare @property (nonatomic, strong) NSMutableArray *whatHappenedSinceLastClear; Then in the implementation I also declare -(NSMutableArray *)whatHappenedSinceLastClear { if(!_whatHappenedSinceLastClear) _whatHappenedSinceLastClear = [[NSMutableArray alloc] init]; return _whatHappenedSinceLastClear; } and then -(double)runProgram:(id)whatHappenedSinceLastClear { NSMutableArray

click on the texture area

人走茶凉 提交于 2020-01-06 07:00:37
问题 I'd like to create a function that will be called by clicking on texture object. I've just figured out how the button action is processed. Could you tell me plz how it works. Maybe some special controls have to be correspond to texture object? thanks in advance ))) 回答1: I assume this is for iOS and by click you mean tap. The following code will add a gesture recognizer to any UIView : myView.userInteractionEnabled = YES; UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc]

How can I determine the index of an object in an NSMutableArray when I search for a NSString within it?

二次信任 提交于 2020-01-05 07:30:15
问题 Currently I am coding the search capability of a UISearchBar using data from a DB that's displayed in a table. I figure out the search results and save them to NSMutableArray *searchResults . Here's how that looks: - (void) searchGrapesTableView { [searchResult removeAllObjects]; numSearchWines=0; for (NSString *str in listOfWines) { NSRange titleResultsRange = [str rangeOfString:searchBar.text options:NSCaseInsensitiveSearch]; if (titleResultsRange.length > 0) { [searchResult addObject:str];

How can I determine the index of an object in an NSMutableArray when I search for a NSString within it?

萝らか妹 提交于 2020-01-05 07:29:05
问题 Currently I am coding the search capability of a UISearchBar using data from a DB that's displayed in a table. I figure out the search results and save them to NSMutableArray *searchResults . Here's how that looks: - (void) searchGrapesTableView { [searchResult removeAllObjects]; numSearchWines=0; for (NSString *str in listOfWines) { NSRange titleResultsRange = [str rangeOfString:searchBar.text options:NSCaseInsensitiveSearch]; if (titleResultsRange.length > 0) { [searchResult addObject:str];

validating an iPhone app archive

烂漫一生 提交于 2020-01-03 18:54:32
问题 Trying to send an app to Apple's App Store. Xcode 4.3.2. Successfully sent the app out to users via testflightapp and now want to send it to the store. When I try to distribute the app via the organizer I get these three validation errors: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it

Putting existing project under source control in Xcode 4.3.2

浪尽此生 提交于 2020-01-02 01:07:33
问题 I was looking for a way to put my existing project under source control, and I looked at this question, but it looks like that solution only worked with Xcode 4.0 because I can't find a way to do what is advised. I also looked at this question, but that solution doesn't work either because my project isn't currently under source control. How can I get my existing project under source control? Edit I want it to be a git repository, not subversion. 回答1: you can do it in terminal using: cd /to

How to create an IPA on XCode 4.3.2

醉酒当歌 提交于 2020-01-01 05:01:27
问题 Creating IPAs is no problem on 4.3.1 even though Apple changed the UI flow. Just "Save for Enterprise or Ad-Hoc Desployment" XCode 4.3.2 does not have that option, only "Save Build Products" and "Export as XCode Archive" Has anyone found out how to create an IPA? 回答1: just set your bundle identifier, click Product –> Archive follow the snaps select Distribute 回答2: This was not related to XCode 4.3.2 and resolved by making sure that the current scheme did only archive one target. 回答3: Before

Finding a bug using Xcode - attempt to insert nil value

淺唱寂寞╮ 提交于 2020-01-01 03:29:08
问题 I am getting a random bug in my app, which is causing it to crash. The problem I am facing is XCode doesn't tell me where the crash is happening only the below information. Can someone tell me how I can find out where I might be able to find the problem within the code? It must be crashing at the same point as when the app does crash it always shows the below. * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to

Keyboard shortcut to toggle between previous file and current file in editor

百般思念 提交于 2019-12-31 00:04:46
问题 I usually use ctrl + tab to toggle between last viewed tab or file and current one in other editors like VS or Netbeans or even on browsers. But with xcode I cannot find a keyboard combo for that. I have googled with no avail. Can anyone please help with this? 回答1: You can navigate forward and back with ctrl + cmd + left or ctrl + cmd + right 来源: https://stackoverflow.com/questions/11449399/keyboard-shortcut-to-toggle-between-previous-file-and-current-file-in-editor