iphone

Universal Application: two different version for iphone and ipad

I have 2 different version of one program! One for ipad and one for iphone! I don't care about dupplication of code. There is an easy and fast method to make a universal application with different file (xib, .m and .h) for specific device (ipad, iphone) thanks ...

iphone code not firing

I have a class that im using and cant get the code to fire WeatherServer.m ---------------------- - (NSArray *)weatherItemsForMapRegion:(MKCoordinateRegion)region maximumCount:(NSInteger)maxCount { //code is not firing } myviewcontroller.h ----------------------- @class WeatherServer; @interface MapView : UIViewController <MKMapVi...

Clear button on UITextView

Hi, How can add a clearbutton (cross inside a circle) for text view like in text field? ...

Create PDF from CSV on iPhone

An iPhone app which I am creating generates reports from a Core Data database as a CSV file, which can then be emailed so that the user may use that data elsewhere outside of the app. I would also like to offer the ability to generate the same reports as a PDF file (of course, with nicer formatting) allowing the user to immediately print...

Crash on CGPDFDocumentCreateWithURL

I get an EXC_BAD_ACCESS on this code: NSURL *pdfURL = [NSURL URLWithString:path]; pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CFRelease(pdfURL); 'path' is just an NSString path the the file I am loading from the documents directory. I have chanced to ensure the path is correct. I am also running on the simulator but I ...

Testing in-app purchase after going live

Hi, I would like to make a contest for my iPhone and iPad apps users. I would like to give some bonus content for winners as a reward. Normally that content is paid (for eg. additional levels) and it's available via in-app purchase, so I'm trying to find any way to give them something like normal promo codes. (Promo codes are not workin...

Examples of doing decimal math in iPhone.

I'm pulling decimal values from a sql table as a text field which i then convert to an NSDecimalNumber (this is simply because i didnt know read/write decimal values to sqllite). Anyway, now i've hit a wall now that im trying to do simple math routines on these decimal variables. Such as, Sum = Balance * Interest_Rate. The idea is that ...

Is it possible to get information about all apps installed on iPhone?

Is it possible to get the information (app icon, app name, app location) about all apps that have been installed on iPhone/iPod? ...

Core Data, filtering out child entities in result set

So I have typical 1:M relationship: Car can have many Models I want to get all Car objects and only Model names that begin with 'A'. I tried a subquery: NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Car" inManagedObjectContext:_context]; [fetchRequest...

Using custom map with MKMapKit

Hi, I am creating an iPhone app for OS4.0, and I am attempting to integrate a custom map with a standard MKMapView. I have been provided a map in .eps format (vector image), and I want to somehow overlay this on an MKMapView in and restrict the scrolling boundaries of the map so users cannot scroll outside the boundaries of the custom ma...

Setting the background image of iPhone from an app

I was wondering if it was possible to set the IPhone's background image from an App. I have an image which is a UIImageView. Like when the phone is locked theres the "wallpaper background image." Is there a way to make a button which can set the wallpaper of the phone as my UIImageView? ...

iOS Jump to different view

I have a navigation based app. The root view is a list of items. From this root view you can tap on a table cell to an item's detail view. Or you can go to a form view to create a new item via the 'Add' button in the nav bar. My question is how I can jump from the form view to the detail view once the new object has been created? I d...

UIPopOverController for iPhone (currently only available for iPad)

Before I implement something similar for the iPhone, I'm wondering if anyone has implemented something similar of the UIPopOverController for the iPhone. This is so far only available for iPad. ...

iPhone - how to declare a method and avoid leaks

Suppose I have a method like this - (UIButton *) createButtonAtX:(CGFloat)vX Y:(CGFloat)vY{ //... bla bla bla... //at some point I have UIButton *myButton = [[UIButton alloc] initWithFrame:myFrame]; // we have an alloc here... // ... more bla bla and then return myButton; } as the button was allocated and not released this i...

Accessing an FTP connection for downloading files

i am new to iphone.. i want guidelines for accessing ftp server through objective c ,where ftp url, username,password should be given in program itself , i want to access a lot of image files from the ftp and display it in my imageview. how to store those image files in locally and retrieve whenever needed.... thanks in advance.. ...

Is there any control that can show photos like "Photos" in iOS?

Does iOS have any control to shows photos like the Photos application? I'd like a control to manage albums, photos, show an album list, and show photos, like the built-in Photos, or the Facebook app. ...

loading Tabbar controller from view controller

Hi all, I am working with a project in which I have to have a login page and after successful login we should have a tabbar view( I am using tabbar controller) when I try to load the tabbar controller using the following code.Nothing works out. LoginSuccess *viewController = [[LoginSuccess alloc] initWithNibName:@"LoginSuccess" bundle:...

How to do calculations only for visible cells in iPhone?

Hi all, I have so many cells in table view say nearly 500. Each and every cells have their own images and string paragraphs. Actually i draw those images & strings with the help of UIView's drawRect method. So i need to calculate image and each string's position (including their width & height to measure the cell height and wrapping are...

Best Framework for Audio

I am making an application for iPhone/ipod Touch. In that application I am recording the voice of a human storing it in a file in NSTemporaryDirectory() and then playing it. So far I have used AVAudioPlayer and AVAudioRecorder but after some time when I record it simultaneously it plays the sound I don't know why? And more over my applic...

UIimagepicker controller image only selection

Hi all, I have to give functionality to select photos by the user. I have used this. ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; Now I have to restrict user to select only photos and i want videos to be not displayed on the list. Or somehow user should not select video at all. Please suggest some way out. Than...