iphone

Getting device orientation before rotating or forcing it at launch. Any ideas?

Hello, I'm here again! I have a deadline soon and I have very annoying bug in front of me and no ideas, how to fix it. The problem is, that sometimes device doesn't know what it's orientation is before it has been rotated and so it messes up frames in conditional statements: if (orient == UIInterfaceOrientationPortrait || orient == 0)...

Showing a one-time UIViewController via presentModalViewController upon launch

Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a fully-stocked UITabBar with several UINavigationController objects and views at-the-ready. I've now been asked to add a one-time registration view to this mix. This view would appear before the UITabBar at app-launch, get some info from the user, regi...

Do NSUserDefaults persist through an Update to an app in the Appstore?

Hi, Is this the case? Do NSUserDefaults get reset when you submit an update to an app on the App Store, or are they reset? My app is crashing when updated but not crashing when downloaded fully - so I'm trying to determine what could possibly be different in the updated session to the freshly downloaded session. Cheers, Nick. ...

Weird Apple Push Notification behaviour when the receiving iPhone is turned off

I'm seeing some very strange behaviour from the Apple Push Notification Servers when the recipient iPhone is off. Here is my scenario: -Send push notification A to Apple. Within a few seconds a push notification popup gets displayed as expected on the iPhone. -Send blank notification to Apple to cancel previous one (the previous ...

How to check if a file exists in Documents folder?

Hi guys, I have an application with In-App Purchase, that when the user buy something, download one html file into the Documents folder of my app. Now I must check if this HTML file exists, so if true, load this HTML file, else load my default html page. How I can do that? With NSFileManager i can't get outside of mainBundle.. Thanks ...

Pagination In TableView, like in iPhone's youtube application

Hi, I like to implement pagination in tableview. I am getting few information from internet as XML(thumbnail url). I like to implement it with out using [self.tableview reloaddata]. This API will load all cell again. But i want to insert only the new data in cell(no need to trouble old data) just like in the youtube application in i...

How to change Background of alert ? and can we change its position?

How to change Background of alert? and can we change its position? I mean is it possible to display it up or down? Is there any sample code available? Thanks in advance. ...

iPhone Dev: Making a tableHeaderView respond to touches

Ok, I'm a objective c noob. I have a table view with a tableHeaderView and I want it to respond to touches? Here are some steps that I do when creating the view: 1. create a view 2. add a bunch of labels and imageviews to it 3. set my tableHeaderView to the view I created Any help will be appreciated! ...

UIButton inside UITableViewController

I have a UIButton that is created inside of each table cell. I want to hook up a touch event like so: [imageButton addTarget:self action:@selector(startVote:) forControlEvents:UIControlEventTouchUpInside]; I want to pass data about the current row (the id of the object for that row) to the startVote method. Is th...

iphone SDK: How to set the initial value of a UIPickerView?

I have a picker view that has a list of numbers to pick from. I want to be able to initialize the control at a particular row. For example, if the user specifies 10 as their default, then the control should be automatically positioned at that row when the control is first initialized. Thanks in advance. ...

UITextView disabling text selection

I'm having a hard time getting the UITextView to disable the selecting of the text. I've tried: canCancelContentTouches = YES; I've tried subclassing and overwriting: - (BOOL)canPerformAction:(SEL)action withSender:(id)sender (But that gets called only After the selection) - (BOOL)touchesShouldCancelInContentView:(UIView *)view; ...

xcode clean failed

Both my iPhone projects are sometimes giving a "build failed" error with no explanation of what the error is, and then a "clean failed" when I try to do a clean. I tty emptying the xcode cache but that doesn't seen to help. What normally clears it is re-starting my Mac. However, that has just failed to work. Has anybody else experienced...

How LibXmlParsing can parse in chunks

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { xmlParseChunk(context, (const char *)[data bytes], [data length], 0); } my Question is as follows => didReceiveData: method receives data in parts Some what like this first data----------| <masterData>Main</ma second data-----| ster><maste...

scheduling a Thread after a Thread in iphone application

I want to schedule a thread after a thread completion. Is it possible ? How? For example ( to specify my need ) - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { // 1. response - schedule myThread // 2. response - schedule a new thread which will be executed after myThread // 3. response - s...

requirement to deploy for iphone

HI, what is the computer requirements to deploy for iphone? and if this computer is good enough ? MACBOOK 1.8HZ 2GB RAM 10.5.8 lopard Thanks!!! ...

UIScrollView imageViewDidEndZooming not being called

I have this subclass of UIScrollView: @interface MyScrollView : UIScrollView <UIScrollViewDelegate> And I have those delegate methods - (void)scrollViewDidEndZooming:(UIScrollView *)aScrollView withView:(UIView *)view atScale(float)aScale{ NSLog(@"zoomed"); } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)aScrollView{ ...

How can I manually display the delete confirmation for a UITableViewCell?

Hey all, I've made a custom editingStyle for my tableView cells. Well really it's the delete functionality, but with a custom icon (the designer does not want the standard red minus icon). I've figured out how to suppress the standard icon and display the custom one. Now I'm trying to display the delete confirmation button after pressi...

Subclassing UIView or composing with UIView

I'll start by saying what I want to do because I'm unsure if I'm asking the right question. I'm making a grid based map and am going to hold an array of objects to keep the state and presentation of the map. Each object will be of a Tile class. Should I be subclassing UIView or sublass NSObject and have an ivar of UIView. I was also plan...

Correlating in-app purchase transaction receipts to reports

Is there is a way to correlate receipts from the payment object to information received in either the financial reports, sales reports or bank statements? All indications are that the reports are aggregate reports and not transaction level reports. Since my products are consumable it is important for me to know things at that level. Unfo...

Any tips or best practices for adding a new item to a history while maintaining a maximum total number of items?

I'm working on some basic logging/history functionality for a Core Data iPhone app. I want to maintain a maximum number of history items. My general plan is to ignore the maximum when adding a new item and enforce it whenever I need to fetch all the items anyway (e.g. for searching or browsing the history). Alternatively, I could do it ...