xcode4.2

Xcode-Increment build number only during ARCHIVE?

℡╲_俬逩灬. 提交于 2019-11-28 15:23:08
I have found a few other posts that show how to add a script to increment the build number with a script: Better way of incrementing build number? Xcode project's "Build number" Can Xcode insert the version number into a library's filename when building? But what I want to do, is only increase the build number when I use ARCHIVE (both before and after). Example: If current build number is 21, then when I choose Product > Archive the build number will be increased to 22, it will go through its process of building and creating the Archive file with the build number of 22, and then when it is

how to resolve the issue: “'Instance method '-arrayByPerformingSelector:' not found (return type defaults to 'id')”

天大地大妈咪最大 提交于 2019-11-28 14:21:49
i saw in one post -(id)arrayByPerformingSelector declaration in interface should do , but when i tried it this declaration was treated as separate method and incomplete implementation issue came... sorry this is quite a silly doubt i am asking but I'm a newbie to iOS and wasn't able to find out whats wrong with this.. self.segmentedControl = [[UISegmentedControl alloc] initWithItems:[viewControllers arrayByPerformingSelector:@selector(title)]]; self.segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar; and also when i run the project thread stops with SIGABRT and in console

Editing Custom UIView Subclasses in Storyboard

孤街醉人 提交于 2019-11-28 14:15:46
I have an application that uses a UIScrollView to page between a number of dynamically generated UIViews. Right now, I have to programmatically set the layout and ui elements of these UIViews, but I was wondering if there is any way to edit the interface of a subclass of UIView in storyboard (independent of a view controller). Thanks in advance. Edit: Just for reference, I'm using Xcode 4.2 with iOS 5. UPDATE As of Xcode 7, you can edit a standalone view in a storyboard. Drag a view from the Object Library to the header bar of a view controller. Interface Builder will show the standalone view

Random number without repeating

自闭症网瘾萝莉.ら 提交于 2019-11-28 12:51:50
问题 I have NSMutableArray with 50 array elements. I need to generate randomly without any repetition. Can you suggest some sample codes. 回答1: here is sample to get random int less than 1000. int y = arc4random() % 1000; to stay without duplicates, just check before inserting 回答2: Create a local mutablearray copy of main array, and after getting random value, remove object available at random index from local array, process it till array count is 1. 回答3: I have assumed you want to generate numbers

Coordinates all wrong on iPhone 3G? It could be your compiler

房东的猫 提交于 2019-11-28 12:01:52
Note: This is question to which I have already found an answer. It seems that posting a question after finding an interesting answer is encouraged , so I am posting this. Someone else is likely to have the same problem and find this useful. I have an iOS app that produces charts. Shortly after publishing an update, a user sent me this panicky email: "the latest update has modified the curves ... not seen more growth curves and inserted data are represented as a line descending ... before you could see perfectly well Help me" I get him to send a screenshot and give more detail. He has an iPhone

ios class not found “Expected a type”

让人想犯罪 __ 提交于 2019-11-28 10:11:08
问题 I'm getting two problems in my FooterSelectorView.h and I have no idea why. One is a warning while the other is an error. For some reason xcode doesn't recognize FooterArchiveItemView so I'm not able to type my object as that which is causing other propblems. Has anyone ever seen anything like this before? How can I fix it? FooterSelectorView.h #import <UIKit/UIKit.h> #import "FooterArchiveItemView.h" @interface FooterSelectorView : UIImageView // #warning Type of property 'activeItem' does

Objective-C, Need help creating an AVAudioPlayer singleton

被刻印的时光 ゝ 提交于 2019-11-28 07:53:05
I'm working on a soundboard app, that has several pages of buttons to play sound effects with a stop button on every page should the user wish to manually interrupt the clip. I'm using avaudioplayer in each view to play the sound upon pressing the button for that clip. It works fine until the view is changed. If a user jumps to a new page the sound keeps playing and the stop button stops working even if they return to the original view. Pressing a sound button no longer interrupts the running sound resulting in two sounds over each other. From googling and searching this site, I know the issue

is it possible to combine non-ARC and ARC project code?

不想你离开。 提交于 2019-11-28 07:38:18
问题 Is it possible to combine ARC and non-ARC projects? I haven't really tried it yet but this is the scenario: We have an old iOS project (non-ARC) with a tab controller. There is a tab from the tab controller that doesn't have any function or view yet. I am making a new project which is related to the old project, and I would like to have it use ARC, if it is possible to combine my new project with the old one and assign my new project's view to the tab. 回答1: Yes of course and it is very easy.

xcodebuild arguments ignored when using archive

≯℡__Kan透↙ 提交于 2019-11-28 07:32:38
问题 My name is Luca and I am currently working on iOS continuous integration to build apps in xcode for distribution (Ad Hoc and App Store) using shell-scripting. So far I achieved good results with IPA files. My problem comes for distribution in App Store. To build a .app from script (passing some arguments) I do: xcodebuild -scheme myScheme -configuration myConfiguration PRODUCT_NAME=myProductName TARGETED_DEVICE_FAMILY=myTargetedDeviceFamily .... etc Since with XCode 4.2, apps submission is

What is the difference between Copy Bundle Resources and Copy Files for Xcode build phases?

你。 提交于 2019-11-28 07:01:03
问题 Could someone explain the difference between the Copy Bundle Resources phase of Xcode and a Copy Files phase? When would I use "Copy Files"? 回答1: Copy Bundle Resources phase copies files that you want to be available in your bundle (.app). On the other hand Copy Files phase copies files to other (standard) locations accessible from your application (for example to /Library/Fonts) giving you also the option to copy them only when installing. You can also see relevant documentation here 回答2: