cocoa-touch

Lower iPod volume to play app sound (like the native SMS app)

I've made an iPhone app to be used while exercising. It plays a bell tone to indicate that you (the user) should switch from one step of your exercise routine to the next. I've designed the app so that you can listen to music on the iPod while using the app, and I want the tone to play sufficiently audibly over the music. I've gotten t...

Subclass of UITabBarController, replaced the TabBar and have a display issue

I have an iPhone app which was built using a standard UITabBarController. This app was created using the standard XCode project template. Now, I have a requirement to change the UITabBar to look very different. The approach I decided to take was like this: in my AppDelegate: for (UIView *view in tabBarController.view.subviews) { ...

Add UIView behind UITableView in UITableViewController code

I would like to use a fixed image as the background in a simple grouped table view in my iPhone program. Unfortunately, no matter what I do, the background is always solid white. I have followed several supposed solutions on this site and others to no avail. Here is the relavant code in the viewDidLoad method of the table view control...

Showing/hiding navigation bar with smooth animation

I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation bar: MyAppAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.navigatio...

What is the delegate method that is called when an MKPinAnnotationView is touched?

I have been searching for this all night and I have just so frustrated. When a MKPinAnnotationView is clicked, the name and the subtitle comes up. I also want to center that point on the view. I figured there was some method I had to override because the information that pops up happened without me having to code it. Hopefully this was c...

Listening for events from a tableviewcell

I have a custom uitableviewcell. It has a uitextfield. I'd like the parent tableview controller to take action when the uitextfield keyboard return key is pressed. How do I get the notification to the parent tableview without creating an app wide event notification? Or, is that the best way? ...

How to optimize callbacks from a NSOperationQueue-started thread

Consider this: @interface SomeViewController : UIViewController { SomeChildObject *child; } @end @implementation SomeViewController - (void) viewDidLoad { ... child.delegate = self; } - (void) somethingHappened { NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:child sel...

Getting the bounds of an MKMapvIew

In order to setup a query to an external server I want to get the bounds of the current Map View in an iPhone app I'm building. UIView should respond to bounds but it seems MKMapView doesn't. After setting a region and zooming in the map I try to get the bounds. I'm stuck on the first step which is to try to get the CGPoints that represe...

How can I know when MKMapview setRegion:animated: has finished?

I want to set a region on my MKMapView and then find the coordinates corresponding to the NE and SW corner of the map. This code works just fine to do that: //Recenter and zoom map in on search location MKCoordinateRegion region = {{0.0f, 0.0f}, {0.0f, 0.0f}}; region.center = mySearchLocation.searchLocation.coordinate; region.span.long...

pop a specific view controller

I have an hierarchy of 3 view controllers in my navigation bar controller: view1->view2->view3. After the user finished with view3 I want to take him to view1. What is the best approach to do that? thanks, Nava ...

Strange problem with custom cells and the uinavigationcontroller

Hey there, I've got a navigation controller that has a grouped table with several rows, each using the same custom cell class. If I select a row it navigates to the next view. When I go back, just for a brief second, the background of the custom cell that was originally selected, expands to the full width of the screen then back again...

MKMapView boundaries?

Anyone know of an easy way to implement boundaries on an MKMapView. For example, I want to tell the map it can only stay in one area. I want to user to be able to scroll but have them stop when they get to a certain latitude/longitude. I tried using the willChangeRegion: delegate but that screwed me over. Thanks. ...

Wildcards in strings

I'm interested in using rangeOfString with some wildcard characters as part of a search string. For example, if I have several strings like "244px" and "356px" and I want to convert all such strings to "320px". Is there a way I can use wildcards to get the desired result? ...

UIImagePickerController in Landscape

Hi Everyone: I have been searching for an answer to this, but cannot come up with anything. Apparently, iPhone SDK 3.0 made it possible that UIImagePickerController can be displayed in landscape mode - but I am not finding any method that will allow this. I would think that if the application is in landscape by default it would automa...

iPhone Simulator, CFServerConection error?

Even with the simplest app (i.e no code, just labels) I get this warning in the system:console (not the Xcode one). I would guess its nothing to worry about, but just wanted to check to make sure? SpringBoard[20558] Unable to create CFServerConnection. Telephony state may be incorrect. I am running iPhone-SDK_3, Xcode 3.2.1, Mac_SL_1...

How to use custom maps images in an iPhone app

Hi! I've searching about using custom maps (for example: a campus university map) in the iPhone App, using coordinates to get my actual position, etc. I've found one way to do that: - Using de google code project: "Route-me" with the OpenStreetMap and map2sqlite. The question is: ¿How I can put my own map layer (the campus university m...

How do I implement - (void) viewDidAppear:(BOOL)animated ?

It is possible to call one method from inside another. I've implemented this function - (void)pickAndDecodeFromSource:(UIImagePickerControllerSourceType) sourceType I want to call following method inside the above one. - (void) viewDidAppear:(BOOL)animated ...

iPhone (ObjC,CocoaTouch) -> Informations, Tutorials, Blogs, Twitter names, Feeds, Podcasts

Hi out there, im new to iPhone Dev and searching the web for resources about iPhone Development. Currently i'm using this resources: Apple iPhone Beta Forum stackoverflow -> iphone Tags iphonedevelopmentbits.com icodeblog.com thanks for every tip :) ...

How do I know when setregion on an MKMapView won't fire regionWillChange/regionDidChange

I'm working on some iPhone MapKit code which fires off some events when the boundaries of the map change (basically some queries to an external server). There is one edge case I can't seem to solve. When users enter a new address I use setRegion to zoom in on that location and afterwards I compute the bounds of the map and query my exter...

Coloration of UIButtons of type UIButtonTypeRoundedRect

I would like the rounded rectangle portion of the subject type of UIButton to be a solid custom color I specify. I understand that . setTitleColor : changes the text color . backgroundColor : changes the color of the four pie-shaped corner pieces behind the rounded rectangle The question is how to change the color of the rounded recta...