iphone

How to search MKMapView with UISearchBar ?

I have an application that needs to have a similar search feature like the Apple "Maps" application (included with iPhone/iPod Touch). The feature in question should not be a hard thing to do, but I'm really clueless about how to input a Street Address in the search bar, and then obtaining coordinates for that address or something that ...

UIImageView in UIView and not to display image parts out of bounds

Hello guys! How can I solve the problem I mentioned in the title? So I have an UIImageView and in it there is an UIImage. My UIImageView is in a View. When I set the origin of the imageview to (-120, -30) then I don't want to see the start of my imageview. Is this possible? Can this be done? How? ...

Create a UIButton with (or without) memory

I'm trying to add a UIButton with code (not Interface Builder). Some examples say you MUST alloc and release memory for the button. Others use buttonWithType and magically create a button without alloc'ing any memory at all. How is that possible? (Both seem to work fine.) Which of the 2 methods do I want to use... and when? Are th...

Random number in iphone sdk?

How do you generate a random number when a button is clicked, and depending on that number, different actions take place. I probably only need a random number from 1-10. -(IBACTION)buttonClicked{ "generate the random number" if(number == 1){ something happens } else if(number == 2){ somethine else happens } etc } ...

iPhone App : Beta testing on specific device before App goes to AppStore

Sub: iPhone App : Beta testing on specific device before App goes to AppStore for public How do you do specific beta testing? I have registered 2 devices in App program portal. Only I have a Mac & device to download the App for testing. The other user does not have a Mac. But he has a iPhone. Is it possible for the other user to have ...

Using mergedModelFromBundles: and versioning (CoreData)

Hi everybody, I'm trying to use the migration feature in CoreData. I've followed the Apple Documentation. I have a problem in the following method: /** Returns the managed object model for the application. If the model doesn't already exist, it is created by merging all of the models found in the application bundle. */ - (NSManagedO...

flipping between 3 view controllers on iphone

I have 3 view controllers. Main view (controller1's view) is displayed first. Based on button selection the 2nd view (controller2's view) is displayed. There are several buttons and a home button on this view. Selecting those will display 3rd view (controller3's view) with animation.Selecting home button will display the main view(contro...

Having problem with pushViewController!! Help

tabBarController = [[UITabBarController alloc] init]; //Create a tab bar view1 = [[View1 alloc] init]; //Create the first view UINavigationController *navigationController1 = [[UINavigationController alloc] initWithRootViewController:view1]; navigationController1.navigationBar.tintColor =[UIColor blackColor]; view2 = [[View2 alloc]...

Client Side Apple APNS Ports

Have several iPod behind a firewall that does not have access to the internet. What ports / protocols does the iPhone use to connected to the Apple APNS server so it can receive APNS messages from 3rd Party applications. I know my application will use port 2195 to communicate to the APNS server to push updates to my iPods but what ports...

When should I release an object in dealloc?

Sometimes when coding in Objective C for the iPhone I wonder if I should release an object in dealloc or is it sometimes better to release in viewWillDisappear if that view is a separate rarely used part of your app. Thanks. ...

NSDate basic usage error

Next to a label showing the value of a slider i want to show the date that corresponds to a start date + the number of days in slider value units. When i move the slider the app crashes in the Simulator. As far as i could find out that happens when i try to create a new NSDate field and my startDate object being "out of scope". Reading...

Dashcode code translation

Hi, a quick, probably easy question whose answer is probably "best practice" I'm following a tutorial for a custom-template mobile Safari webapp, and to change views around this code is used: function btnSave_ClickHandler(event) { var views = document.getElementById('stackLayout'); var front = document.getElementById('mainScree...

cllocation to UIWebView - iPhone

Hi I am wondering if there is away to send the lat and long of a persons location to a URL? It would also need to have their UDID number to match with the database. Here is what I have so far if anyone can help that would be great... -(void)viewDidLoad { NSString *query = [[NSString alloc] initWithFormat: ...

Hiding buttons/images shortcut?

Is there a shortcut for this code? -(IBAction)reset{ button1.hidden=NO; button2.hidden=NO; button3.hidden=NO; button4.hidden=NO; button5.hidden=NO; button6.hidden=NO; button7.hidden=NO; button8.hidden=NO; button9.hidden=NO; button10.hidden=NO; button11.hidden=NO; button12.hidden=NO; bu...

iPhone writeToFile doesn't work

I have written one application that save txt file into device. When I test on simulator, I am able to read and write file. After I test on device, read is working fine but it doesn't write anything on that text file. I have searched for the solution but it seems like it has problem with right access. Anyone can suggest me how to make thi...

iPhone Objective-C JSON Parser

Has anyone had issues with a size limit on a returned JSON Object using the JSON Parser that is available for the iPhone? Here is a link to the JSON framework I am using: http://code.google.com/p/json-framework/downloads/list (I am using the latest version) If I reduce the size of the returned JSON my app will run just fine. If the ob...

How can I check if a microphone is plugged into the iPhone?

I'm using AVAudioRecorder in the AVFoundation framework. I'm wondering how I can check for a microphone device being plugged in (on the iPod Touch)? ...

Reloading UITableView keeps old data

Hi. I have a custom view MyView : UIViewController <UITableViewDelegate, UITableViewDataSource> with a UITableView within (and some buttons and labels). I have a notification from another view to populate the table with data form a sqlite3 database. I passed an array and after handle the notification I reload the table ([tableView ...

Should I import UIKit in every file I code?

I'm coding for the iPhone and wondering if I need to include UIKit in every file that code or is there a better rule as to when to do so and when you don't have to? Thanks! ...

Error while getting current location on maps

I am new to iphone development.I am creating a map application.I have used following code in header file @interface BrusMapSubviewcontroller : UIViewController<UIApplicationDelegate,CLLocationManagerDelegate> { IBOutlet MKMapView *mapView; IBOutlet UIToolbar *toolbar; IBOutlet UIButton *location; IBOutlet UIButton *backtocampus; CLLo...