iphone-sdk-3.0

UIApplication sharedAppication error: program seems to be accessing wrong file

…衆ロ難τιáo~ 提交于 2019-12-25 01:34:30
问题 in my MainViewController implementation, I need to access variables from two different classes. one of the classes is the AppDelegate and the other is the FlipsideViewController. the way I accessed these was through this code: -(void)someMethod { MyApplicationAppDelegate *appDelegate = (MyApplicationAppDelegate *)[[UIApplication sharedApplication] delegate]; FlipsideViewController *viewController = (FlipsideViewController *)[[UIApplication sharedApplication] delegate]; then I have an array I

didSelectRowAtIndexPath not working on sdk 3.0

為{幸葍}努か 提交于 2019-12-25 01:26:02
问题 I was working on an app in SDK 2.x and everything was working fine, but now I have updated my SDK to 3.0 and found: didSelectRowAtIndexPath of tableview is not working. Anyone know why this is happening? 回答1: The Table View Programming Guide says: "You can control whether rows are selectable when the table view is in editing mode by setting the allowsSelectionDuringEditing property of UITableView. In addition, beginning with iPhone OS 3.0, you can control whether cells are selectable when

How do I add the iPhone SDK 3 to the latest version of Xcode?

烈酒焚心 提交于 2019-12-25 01:25:25
问题 I just upgraded Xcode, but now I don't have any 3.x SDK for Simulator. How do I add it for testing purposes? 回答1: You can try using old versions of XCode (with previous simulators) but the most reliable one is using a device. The iPhone1's latest OS version is 3.1.3. I'm sure you can pick one pretty cheap on eBay or similar. You will also need to make sure that you drop the minimum OS version to 3.0. 回答2: You can goto Project->Edit Project Settings, and from there edit the "Base SDK" to what

Change name of Iphone Project

﹥>﹥吖頭↗ 提交于 2019-12-24 23:03:54
问题 i have edited an app and made some changes in it. I want to change its name .. SO i tried lots of methods to change the name and was success.. but the problem is, when i run this new application it replaces the older one.... but i want both to be there....not replacement... edited---- my app support inapp purchase could be this is a problem? is there any method to do this? 回答1: You need to create a new app id in provisioning portal and then change the bundle identifier in your [Project]-Info

how to program drawing from a deck of card where value and suit is unimportant?

三世轮回 提交于 2019-12-24 18:53:18
问题 i know that there are many ways to program a deck of poker cards where value is important after searching on the net. My problem is that my "deck" of cards is a simple array with value as "card name" (example 1 = Ace of Spades) Do i randomize my current Array with NSMutableArray and then remove index 0 everytime the card is being "drawn" til the last card?" 回答1: The standard algorithm is something like this: a) Populate an array of 52 cards (order not important) b) Set size variable to 52 c)

How to set custom UINavigationBarButton color

♀尐吖头ヾ 提交于 2019-12-24 16:10:03
问题 I'm trying to set a custom color for a button on my UINavigationBar, but only when a particular UIViewController is being displayed in it (I know this is dubious UI design, but it's a specific customer requirement). Our current implementation uses a Swizzle to override drawRect for all UINavigationBar objects. This is necessary so our custom navigation bar colors are applied to standard iOS screens (like when adding a new contact through standard APIs). I want to change the tint color of the

App crashes after launching on OS 3.1

允我心安 提交于 2019-12-24 15:42:13
问题 I need help to understand the crash log i received from the client. The app works fine on my phone but it crashes with him. I have OS 3.0 installed here while my client has upgraded to OS 3.1. Client reported app crashes usually when he starts the app. Why I am getting EXC_CRASH (SIGABRT)? Can anybody point me in the right direction here? Incident Identifier: AA3A4B6A-BD0D-473F-B1D2-EF9655A0116E CrashReporter Key: f3a4736dc8d450a3cb0ecb7367313dbbd816c484 Process: MyApp [730] Path: /var/mobile

Communicating between view Controllers

≯℡__Kan透↙ 提交于 2019-12-24 11:08:51
问题 one of my view controllers has several UISwitches, and I want another view Controller to be able to access the values of the UISwitches for If/and statements. How do I do this in Objective-c? 回答1: You probably don't want to do that. If you want a second ViewController to have different behavior based on switches thrown in the first, you should just bind the switches to User Defaults, which you can read anywhere in your app. http://icodeblog.com/2008/10/03/iphone-programming-tutorial

iPhone OpenGL ES missing functions should be there - glBlendFuncSeparate etc

天大地大妈咪最大 提交于 2019-12-24 09:39:23
问题 I'm using OpenGL ES 1.1 on the iPhone, and I'd like to use the following functions: glBlendFuncSeparate glBlendColor With their related constants. These didn't exist in early iPhone GL implementations, but according to this page: http://developer.apple.com/iphone/library/releasenotes/General/iPhone30APIDiffs/index.html they should be there in 3.0+, which I'm building for. But I'm getting "implicit definition" warnings. What do I need to do to get those functions? Thanks! 回答1: These functions

how to compare dates in iphone sdk?

时光怂恿深爱的人放手 提交于 2019-12-24 07:05:35
问题 i have two dates i want to compare which one is greater date how do i do this in objective-c? 回答1: From NSDate class reference: NSDate -compare: Returns an NSComparisonResult value that indicates the temporal ordering of the receiver and another given date. (NSComparisonResult)compare:(NSDate *)anotherDate Parameters anotherDate The date with which to compare the receiver. This value must not be nil. If the value is nil, the behavior is undefined and may change in future versions of Mac OS X.