iphone

Best practice on initializing your NSStrings on the iPhone

xCode's "build and analyze" complains about "s" being possible garbage. Which is the better solution? A, B, or C? NSString *s; // A NSString *s = nil; // B NSString *s = @""; // C if(x == 1) s = @"you picked 1"; if(x == 2) s = @"you picked 2"; if(x == 3) s = @"you picked 3"; ...

iPhone/Android swipe detection for mobile browser

Is it possible to detect that the viewport is being dragged by a touch event? Using the following code I am able to get the position of where the finger touched the screen, what node started the event and where it was dragged to. Which solves one of the problems but I would really like to detect when the user has dragged the page/window...

Playing audio in iphone3 and iphone 4

I did an iphone app that works on iPhone 3GS but not in iPhone 4. Here's the description of how it works: First place a call to some one from iPhone Put the call on speaker phone Go to home screen of iphone Launch my app that plays some audio When the caller lifts the phone he will be able to hear the audio (if it goes to voice mail, i...

UITableViewController not reloading data - ASIHTTPRequest

Hi all, I am having trouble getting my UITableViewController to reload/refresh the data. I have a method which uses ASIHTTPRequest to call a URL and bring back some string data. I am trying to put this data into a cell of the table, but [self.tableview reloadData] is not working. I was thinking that the ASIHTTPRequest completes its ...

sorting NSMutableArray weird results with Core Data

Hi all, I have been going over this for hours and cannot find the problem. I have an array of scores which I save at the end of a game in a core data model. After saving when I go back into the high scores viewcontroller I load the scores from core data and sort the array using the following function where scores array is an NSMutableA...

Is it possible to retrieve website source code for parsing in an iPhone app?

I'm making an application that directly takes images from a site and downloads them into the apps Documents directory for use when the user doesn't have a data connection. The application will check the site for the latest post and update accordingly. I've never done anything with databases before and thought that this would be easier t...

Xcode unable to create new "Window-based application" iphone app from template

I'm trying to create a new "Window-based Application" in Xcode and I'm getting the following message: Internal Error File: /SourceCache/DevToolsIDE/DevToolsIDE-1688/pbxinterface/Wizards.subproj/PBXWizardChooserWizard.m Line: 1365 Object: <PBXProjectWizardChooserWizard:0x200b845e0> Method: sheetDidEndWithReturnCode:fileSystemLoc...

What to use instead of initWithStyle: reuseIdentifier:

I have watched the Lynda iPhone tutorials and on the lesson about Tableviews there is a method to create a cell as follows. //create cell UITableViewCell *cell = [[UITableView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentidier:@"cell"]; but Xcode says there is no such me...

adding cerated instances to CoreData

Hello i just first tried out core data right now. I created an App which loads Locations from a Server and creates by using a JSON-Parser dynamically Model-Instances of Class "Location". Works fine and no problems. Now i need to store some locations as favorizedLocations localy on the client. Therefore i want to use CoreData. I had s...

iPhone - Web service client app

Hi I am writing an app that’s a very simple web service client. I have the following questions: 1. Is there a standard common way to write the web service consumption part so that it won’t interfere with the main GUI thread? Is it common practice to use the main thread considering the web request should take a very short time to comple...

Section on top of section iphone table help

Hello, i am building a sectioned table, and it is showing up with what looks to be a section on top of a section. You can see on the image that there is a white line under each section. The image Here is the code i have to build the table: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [alertList c...

How to change width of UIAlertView buttons?

When users begin a specific action in my iPhone app, I am using a UIAlertView to display a help message with two button options: "OK" and "Don't Display Again", so the user can choose whether or not see the help message the next time they begin that action. However, the UIAlertView buttons are divided equally within the screen space - so...

How to approach sqlite database of iphone calendar

Hi, guys. I'm developing iphone app. so, I want to read database of iphone calendar. But I don't know how to read database of iphone calendar. Please tell me how to read. Thanks. ...

jQuery: iPhone Problems

Hi, I'm writing a website for iPhone and I use jQuery for image resizing and to scroll to the top. Both are working in the Firefox on Mac but not on the iPhone. I don't know why because it's the same document and jQuery should be cross plattform... Any guesses? Best regards, Sebastian EDIT: This is my Code: var width_max = $('#sti...

Aggregating Applications Question for my Business...

Hello, I am new to the iPhone application world, so any help/information that you can offer is greatly appreciated. I am looking to take several of the top applications in a category and combine them by creating one launcher app. My questions are as follows: 1. Is it possible to combine the compiled binary files for each app, and create ...

Editing a plist within Xcode

I would like to edit a plist from Xcode which I will use to fill the table view. The thing is I have an array of images, and the user can add one of these images to a favorites list. This needs to be written to the plist. So I need the index number of the image and the name they choose to save it with. How can I write to a plist? Th...

ModalViewController goes to background on application start

I am migrating my app code base to iPhone SDK 4. In one of the screens I use -(IBAction) LoadSearch { MySearchViewController *mySearchController=[[MySearchViewController alloc] initWithNibName:@"MySearchViewController" bundle:nil]; [self.navigationController presentModalViewController:mySearchController animated:YES]; } That launche...

UIToolbar tint on iOS4

Hi guys, just switched to iOS4 on my iPhone 3Gs and some of my apps broke. One issue I had is that I had a UIToolbar with some buttons, tinted to pink, that worked well on the 3.1.3 OS. After upgrading to iOS 4, the toolbar was still tinted, but the buttons it contained were no longer affected by the tint. The toolbar was pink while th...

June 25 changes to BIS 742.15 How does it impact SSL iPhone App export compliance

This question isn't strictly development-related but I hope it's still acceptable :) On June 25, 2010 the BIS updated 742.15 and of interest to me is the new 742.14(b)(4) "Exclusions from mass market classification request, encryption registration and self-classification reporting requirements" and 742.15(b)(4)(ii) which states… (ii) F...

ios4 sdk, uiwebview with custom buttom on it

I'm using iPhone OS 4 and creating an application. I've a webview, over which I'm placing two custom buttons with images (no text). When I'm running the app, I'm not seeing the buttons at all. any suggestions? I've a tab bar view and one of the view has this web view. Edit: You can download the XIB and related files from http://dl.dro...