xcode5

Custom Fonts in Xcode 5

泪湿孤枕 提交于 2019-11-28 16:53:09
How would you add a custom font in Xcode 5 and how would you change every label in the project to that font? Because I've heard you can only do this programmatically? Much better option is to add the new font to your system/OS fonts directory and then from there it can be added in the storyboard or used with NSAttributed strings. Steps: Download your font .ttf files Go to any label/textview in your storyboard and select in top right attributes inspector: "Text" Then select > "Attributed" Click the little T icon next to the font name to open up the fonts editor Go to the cog/wheel/setting icon

How to create variables for use in Xcode build settings values?

我的梦境 提交于 2019-11-28 16:49:48
XCode has a number of built-in variables that are used for convenience in Build Settings, for example "$(PRODUCT_NAME)" or "$(CURRENT_ARCH)" . Can I define my own variables? How / where? In XCode 5 this has changed slightly. Select the project or target in the left side of the editor Go to the Editor menu in the top menu bar Select "Add Build Setting" and then "Add User-Defined Build Setting" Create a user-defined build setting. To create one in Xcode 4 select your project from the project navigator to open the project editor. Select your project or target from the left side of the editor.

Xcode 5 - “iOS Simulator failed to install application” every time I switch simulators

大憨熊 提交于 2019-11-28 16:26:51
Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring. Anybody have a permanent fix or workaround? Looks like this is a known issue. From the Xcode 5 release notes : After switching the minimum deployment target of an application from iOS 7.0 to a release prior to iOS 7.0, building and running the application may fail with the message “iOS Simulator failed to install the application.” Go to the iOS home screen, click and hold the

Xcode 5, Export Project to SVN repository

旧城冷巷雨未停 提交于 2019-11-28 16:15:12
In previous version of Xcode there was a repository section in Organiser which is now missing in Xcode 5. How to export project to SVN in Xcode 5. One way is using an svn client. The one which is obviously available is the command line svn client. So here's how I use it: Our repository is: https://myserver.me.com/svn/ The repository is added to Xcode using Xcode->Preferences->Accounts . Create a new project inside Xcode 5: $HOME/IOS/Projects/MyProject Close the project or maybe even better close Xcode to avoid Xode interfering with svn. Really. Open a terminal and change directory into the

Localize Asset Catalogs

让人想犯罪 __ 提交于 2019-11-28 16:12:30
I know it's a new feature and this may not be possible, but I would like to be able to localize an Asset Catalog in different languages, to show a localized launch image. This was possible on XCode 4 simply localizing an image, but with an iOS7 app it not works. Do you know if that is possible? I went the classic way. Just use single localized images and set up your plist correctly. The easiest way is to use one asset catalog, set everything up. Then open the application bundle and copy the correctly named files + the correct info.plist entries. (And of course remove the assets catalog

Status bar appear over my view's bounds in iOS 7 [duplicate]

ε祈祈猫儿з 提交于 2019-11-28 15:59:41
This question already has an answer here: Status bar and navigation bar appear over my view's bounds in iOS 7 20 answers I tried to test my app in iOS 7, and then I find my view appears over the status bar... As I read, in iOS 7, the status bar is hidden. So how do I make it compatible to run both in iOS 6 and iOS 7? Should I have to make different .xib files for different iOS versions for each screen? I have been going through reading this: If both versions of a standard app should have a similar layout, use Auto Layout to create a UI that works correctly in both versions of iOS. To support

Add spacing constraint to superview in Xcode 5

我的梦境 提交于 2019-11-28 15:56:49
I am building an iOS app in Xcode 5, and I'm having trouble adding layout constraints. In Xcode 4.x, I could just add leading/trailing/top/bottom spaces to container (superview) to any UI element. Now, I only have this option: I want to add a "bottom space to superview" constraint to my text view. It says "spacing to nearest neighbor", but I don't want to create a constraint to "nearest neighbor", I have something else under my text view, and I don't want to create a constraint with that. If there is no other object under my text view, it adds a constraint to the container correctly. But if I

Using Boost on XCode 5 - Apple LLVM 5.0

心已入冬 提交于 2019-11-28 15:44:46
问题 I am glad the NDA for XCode 5 is over and I can ask this question. I have a problem building Boost for XCode 5 now that there is only one compiler LLVM 5.0 I've tried with Homebrew using --c++11, using clang.... I've tried various ideas and scripts but none has worked so far. Any help would be appreciated. Thanks 回答1: To build 32/64 bit fat static binaries for boost 1.54.0 compiled with clang/llvm, the only compiler for Xcode 5: Download the unix tarball (not the ZIP! -- that has CR/LF line

Delete provisioning profile from Xcode 5

孤街醉人 提交于 2019-11-28 15:30:19
问题 I've struggling with this for hours. I have 2 same provisioning profiles I've created and the new profile didn't substitute the old one (which expires 6 days earlier than the new one). Through the XCode 5 menu I can't seem to delete the duplicate provisioning profile. Any workaround in this situation? 回答1: If you delete the profile from the Apple development a/c and hit refresh in XCode (Using xcode>Preferences>Accounts) then these profiles will be gone. You can remove them from the this

Cocoapods setup stuck on pod setup command on terminal

半腔热情 提交于 2019-11-28 15:29:57
MacBook-Pro:~ skbc$ pod setup --verbose /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 Setting up CocoaPods master repo Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`) $ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master Cloning into 'master'... Have gone through resources provided by Cocoapods web site, SO and few video tutorials. Nothing happening even after waiting for couple of hours, however still