iphone

iPhone enumerateGroupsWithTypes finishing selector

Hi, I'm using [assetsLibrary enumerateGroupsWithTypes:groupTypes usingBlock:listGroupBlock failureBlock:failureBlock]; to enumerate Photo Albums. The enumerator si acting in an "asynchronous" way, in other words the methods returns before enumerating all items. How can I know when the enumeration is finished? I'm populating a NSM...

How to directly link to my app rating site in the App Store application?

I wonder how Tapbots managed to link directly to the rating site of Convertbot. When you tap the button, the App Store app launches and you immediately see the ratings of Convertbot plus a huge button titled "Rate this app" (or similar). How to figure out this link, and how to launch the App Store app to go to that page? Assuming havin...

Monodevelop does not show iPhone application option...

I am using the latest iPhone IDK, Mono, monotouch and Monodevelop as of July 1, 2010. I installed on a Mac with latest version of Snow Leopard. When I open MonoDevelop, the option for an iPhone application is not listed. Also, when I use the Interface Builder and place controls (set outlets also) and save, there is not change in the rela...

Webkit download pre-built database

I have a rather large db (as in many records). I'd rather let the client download a pre-built db instead of forcing them to load a bunch of text, then insert all the records before being able to use the db. The closest thing to a spec I can find is this: http://developer.apple.com/safari/library/documentation/iphone/conceptual/safarijsd...

how to resize image comming from Xml Feed

Hi I am getting image from Xml feed and then displaying it in table cell what I want to do is to resize image to minimum size of 5kb my code is. int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1]; imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"image"]; NSURL *url = [NSURL URLWithStrin...

Dynamically created UIView Objects

Hi all: I have a predicament, in as much that I need to create an arbitrary amount of UIView Objects. I have an NSArray and what I need to do is create UIView Objects for the number of items in the array, so I got an int from the [NSArray count]; method, so I know the number of objects needing creating, but the way to implement this has...

Video speed is lke 3x normal when I play it in a device...

Thing is, when I test my movie on the iphone simulator, the video speed is ok, but when I play it on the device, an iPhone, the video speed is like 3x faster than normal... This is my code: mMoviePlayer = [ [MPMoviePlayerViewController alloc] initWithContentURL:[self movieURL] ]; mMoviePlayer.moviePlayer.controlStyle = MPMovie...

Need to create a snapshot of a view at runtime...

Hi, i need to take a snapshot of my current ipad-view. That view loads and plays a video. I found this function which works almost really well. - (UIImage*)captureView:(UIView *)view { CGRect rect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentCont...

(iPhone) How to enable ipod controls in the background to control non-ipod music (in ios4) ?

A good example of what I'm trying to accomplish is implemented in the latest version of the Spotify iPhone application for (Pandora seems to have the same feature) . When Spotify is in the background, double tapping opens the "multi-task dock", where the ipod controls (play/pause, forward etc) allow to control the music playback of Spot...

special characters in Objective-C plist

I had not run into this before but I wanted to know if it's possible to store KEYS with special characters in Objective-C / Cocoa Touch Since one can force a line break in a NSString with \n I wanted to store some values in a plist (and they do need to be the keys). It's just about 20 lines to static data (well, the keys, the values are...

iPhone 4.0 Simulator: didFinishPickingMediaWithInfo is missing UIImagePickerControllerOriginalImage?

I've got a simple UIImagePickerController which tries to grab the original selected image: if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { if(defaultpicker == nil){ defaultpicker = [[UIImagePickerController alloc] init]; } defaultpicker.delegate = self; ...

If you could buy two books..

Addition: Think its worth having a look at this again as a number of new books havve/are being released with updates to iOS4 and the inclusion of iPad programming. Ok, I have read a number of posts regarding iPhone dev books, Cocoa and Objective-c. The general consensus seems to lead to one of 4 books. Kochans Objective-C book. Hill...

AVPlayerLayer with alpha mask

Has anyone got a video playing on an AVPlayerLayer with an alpha channel? If so, how is it possible? I've tried many different solutions including using pure alpha channel video, applying blend modes to the target layer and animating every frame myself. The only workable solution is the latter and it bogs the phone down too much. ...

How can I populate UITableView with XML?

I have a tab bar application. In one of my tabs, there is a search bar and a table view below that. When you enter something into the search bar, it returns parsed xml. I need to put this parsed information into the tableview below. The class inherits from UIViewController. I declared a UITableView object in the header file and linked it...

non_lazy_ptr linker errors extern variables and functions iOS4 development

Thank you in advance for your help. I have an iPhone application written in a combination of c and Objective-C which gets a lot of linker errors such as: "_gListSelection", referenced from: _gListSelection$non_lazy_ptr in PalmUtil.o (maybe you meant: _gListSelection$non_lazy_ptr) These variables are properly defined as exter...

Can Blocks built for the iPhone 4 SDK work when deployed to iPhone OS 3.0?

The latest Xcode IDE requires you to target iPhone SDK 4 while dynamically handling deprecated and new functionality if you set the application to deploy to earlier releases. So can I use new features like Blocks and still have it work on a device running iPhone OS 3.0 or 3.1 or 3.1.3? I have not found documentation on how to do backwa...

How do I add a UITtoolbar to my main view.nib?

How do I add using the InterfaceBuilder? ...

Detect iPhone browser in .htaccess/apache and redirect to iPhone site

Is it possible to detect iPhone browser agent in .htaccess and redirect the user to the correct iPhone page? ...

What to do to fix "no qualified ads found for this request" on iAd?

Hi, Somehow I got this error message when testing iAd on the device. "no qualified ads found for this request" What to do to fix it? Anyone has any idea? On the simulator there is no error, it succeeds to show the "Test Advertisement" UPDATE: The real problem here is that the delegate to raise the error IS NOT BEING CALLED, on the ...

Core data predicate with group and MAX()

I have an object in core data that has 2 fields: Name and Date. Each time a person checks in it saves their name and the time they did it. Is there a way to get a list of all unique people with their last check in time using a predicate in core data? Note: i do know that 2 tables would make it easier. the sql for this would be selec...