Different source for callout in MKAnnotation? - iphone

I have a UIViewController that displays the MKPinAnnotation callout, using a XML source to display the related title and subtitle that I want. Is it possible to use the same UIViewController, but with an image this time as I would need to do another callout whereby I load the title/subtitle and image?
Is it possible to use the same UIViewController for the callout, but different sources? e.g. XML and retrieval from database?

you can use it but look into the documentation for the mapView. Try overriding the pin and the view functions so it can display a custom image.

You can use image property of the MKAnnotationView to show your image or you can use leftCalloutAccessoryView to add a uiimageview with your image to show on callout.

Related

iPhone camera toolbar buttons

The iPhone camera toolbar holds the following buttons: cancel/record
I would like to change the cancel button to the small image button that takes me to the photo library.
I wasn't sure if i need to use the overlay or does the xcode have something more comfortable in this case since this is something well known and used.
Is there something like this?
Thanks,
You can set overlayView to your UIImagePickerController
imagePicker.cameraOverlayView = yourOverlayView;
UIImagePickerController Class Reference
You can customize an image picker controller to manage user interactions yourself. To do this, provide an overlay view containing the controls you want to display, and use the methods described in “Capturing Still Images or Movies.” You can display your custom overlay view in addition to, or instead of, the default controls. Custom overlay views for the UIImagePickerController class are available in iOS 3.1 and later by way of the cameraOverlayView property. For a code example, see the PhotoPicker sample code project.

custom tableview with only image

I have a default tableview style with 4 entries and would like to customize it show only 4 large image.
Is possible custom table view or i must use another method?
When you have such a display (a menu like, not a table like) I use simple buttons with the following properties:
Type: Custom
Background: an image in .PNG format since it supports transparency and I can do a nice layout with it.
I either set the Title of the button if it doesn't ruin the design, or I add labels under the buttons to explain what they do. In the TouchUpInside event of the buttons I push the view that I want using a navigation controller.
If you're ONLY using four images, consider using a typical UIViewController and laying out the objects in the nib file.

Creating a custom UIActivityIndicatorView

I want to have a custom view for UIActivityIndicatorView rather than relying on options given by iOS. How can I create my own view here?
I have a list of images with me to create a animated view.
As you haven't specified the case in which you want to use the activity indicator,
check the below tutorial blog for custom UIActivityIndicatorView,
Custom UIActivityIndicatorView (EDIT: This link is gone)
Showing a "Loading..." message over the iPhone keyboard
This is implementation of custom UIActivityIndicator from scratch ready for integrating.
Abhinav, if you want to use a set of images you could as well use a UIImageView. Set the animationImages and start-stop as you wish.
This one looks nice and clean, can be hooked to the code easily too.

Adding an image to my UIViewController

just a quick question here.
How can I add an image to my UIViewController. Currently, my view controller has a couple labels and a couple buttons, but I have a file line.jpg that I'd like to add to this view controller as well. And I'd like to add it at a specific location (namely, at the center of the screen). How could I (meaning, what is the code?) initialize some object (that encapsulates my image) and then add it to the screen?
Thanks!
Use UIImageView for that.
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImageView_Class/Reference/Reference.html

Custom MKPinAnnotation callout bubble similar to default callout bubble

I want to create a custom callout bubble on MKMapView. But I want to create the call out bubble in the same manner of default bubble. So how to create a View look like annotaion in this image
(source: objectgraph.com)
I want a custom custom view which look like "Parked Location" annotaion in the following image. With custom width, height etc. P
I am not able to add required details in Default bubble. That's why am creating custom bubble.
I have developed a custom callout bubble that is nearly identical to the system callout bubble, but gives more flexibility over the height and content. It should be fairly trivial to adjust the appearance to suit your needs. See my post on the Asynchrony Solutions blog for example code and the steps required to implement a good callout replacement.
You need to use MKCircle and MKCircleView.