xcode5

Disable English localization with Xcode 5

痞子三分冷 提交于 2019-12-05 14:36:01
I have searched related questions and tried many suggested methods but none seems to work. I have a japanese-only App that when run on an english device gets UI items such as back buttons translated ("Back"). To achieve this I have: Deleted the English from "Localizations" from my project and chose to delete localized files (was a single *.strings file). Changed CFBundleDevelopmentRegion in my Info.plist from jp_JP to jp as I read it should match the name of the *.lproj folder. Cleaned, deleted, closed Xcode, etc. But default UI items are still getting translated to english. Also I get some

UIWebview scrollview changes contentsize for no reason

时间秒杀一切 提交于 2019-12-05 14:29:28
I have a uiviewcontroller which loads a uiwebview. When the uiviewcontroller loads the uiwebview everything is done correctly. But when one navigates away and returns back and the uiwebview is not loaded, it is displayed differently. The uiwebview scrollview's contentsize height changes by 64px, it gets higher. When it is loaded for the first it looks like this When one returns back to the view, this is what happens I hope I was able to make my problem understandable. If more details are necessary, I am able to give more. Thank you I had a similar problem, try this code in your viewDidLoad

Set auto increment in Core data iOS

狂风中的少年 提交于 2019-12-05 12:44:17
问题 I am using Core Data, and want to set an auto_increment ID as one of the fields which will be unique. Is it possible to set auto_increment in iOS using core data? Can anyone help me with a small example of how to implement this? Below is the code through which I am inserting records in database. In the first field "id", i want to set it as auto_increment and not manually insert it. - (NSManagedObjectContext *)managedObjectContext { NSManagedObjectContext *context = nil; id delegate = [

Import a project in SVN from Xcode 5

大兔子大兔子 提交于 2019-12-05 12:08:03
问题 In xcode 4 organizer there was a button "import", in xcode5 how do I import a project in my svn repository? thanks 回答1: The question is a bit confusing so please advise if it's not exactly what you need (otherwise, feel free to accept the answer). The confusion is that the Xcode 4 workflow you describe is used to allow developers to manage repositories (svn or git). If you want to take an Xcode project and add it to an existing svn repository I am attaching links to answers for that question.

How do you use an asset catalog image's slicing information programmatically?

冷暖自知 提交于 2019-12-05 11:46:36
I used to have an image in my project and I would load it like this: UIImage *image = [[UIImage imageNamed:@"image_name"] resizableImageWithCapInsets:UIEdgeInsetsMake(10.0f, 10.0f, 10.0f, 10.0f)]; Now I put that image into XCode 5's new asset catalog and I set the slicing for it. How do I use that image in my code so that I don't have to explicitly call resizableImageWithCapInsets when loading the image? Said another way, how do I take the slicing information stored in Images.xcassets and store it in a UIImage 's capInsets property? Or am I thinking about this all wrong? Ok, I was able to

Exclude a file from Xcode when searching

China☆狼群 提交于 2019-12-05 11:30:14
Is it possible to exclude files in a project from Xcode when searching? I have some JSON files in my project and Xcode constantly locks up if it finds matches in these files. You can define custom search scope for your search. Custom scope can be define, save, and reuse specific location and file criteria for searches. Now you can add as as many file names as you want. More details on how to use custom search scope can be found here- https://developer.apple.com/Library/ios/recipes/xcode_help-search_navigator/articles/adding_a_search_scope.html Xcode 9 update Here are examples to search

Link binary with static library in xcconfig

爱⌒轻易说出口 提交于 2019-12-05 11:18:57
I have an Xcode project that is essentially a single app that gets built into several almost identical targets. I have moved nearly all build configuration settings in central places, but I cannot figure out how to move linking against a static library (libMantle.a) to the xcconfig. I have tried the -framework and -l flags, like I'm using for various other libraries, but they don't work. Is there a way to get .a files out of the Link Binary with Libraries pane, so I don't need to keep all the targets in sync manually? Figured it out... Let's say you want to link against the file

Localization strings file not working with xib in Xcode 5

允我心安 提交于 2019-12-05 10:12:38
I have the following file structure for localization. A.xib ->A.xib (Base) ->A.strings (Spanish) ->A.strings (English) Since it is "Use Base Internationalization". We can expect to have only one xib file and required strings file for the localization. But, soon as i convert this strings file to .xib (where for each language we have .xib file. This was the case before Base Internationalization). Things start working the iOS simulator and device responds to such changes. Note:- I had also tried to reset the simulator , clean and created the build but no success. Don't know why localization fails

UIKeyboard not automatically translucent in iOS7

主宰稳场 提交于 2019-12-05 09:44:47
I understand that when developing in Xcode 5 with and iOS 7 project, the keyboard that pops up when interacting with a UITextField should be translucent and show through any colors in the background. This is not the case in both my projects. I have a colored & blurred background and I'm hoping for that to transpire through the keyboard; however the keyboard remains the default white/gray. This is what I have so far as a demo: UIColor *tintColor = [UIColor colorWithWhite:0.21 alpha:0.4]; UIColor *background = [[UIColor alloc] initWithPatternImage:[[UIImage imageNamed:@"universe.jpg"]

Invalid context 0x0 on UITextField (Xcode 5)

廉价感情. 提交于 2019-12-05 09:38:36
I am using a UITextField in my app. I am using [texfield becomeFirstResponder] . This works just fine and loads the keyboard when the view is loaded. However, this error comes up when I click on the UITextField again after it has been brought up. I don't understand exactly why, but here is the output I am getting: CGContextSetFillColorWithColor: invalid context 0x0. CGContextSetStrokeColorWithColor: invalid context 0x0. CGContextSaveGState: invalid context 0x0. CGContextSetFlatness: invalid context 0x0. CGContextAddPath: invalid context 0x0. CGContextDrawPath: invalid context 0x0.