iphone

Ken Burns effect on iPhone views

Hey, are there any exisiting approaches on how to apply Ken Burns slideshow effects (take a look at a javascript demo: slideshow demo site) to a view? Regards... ...

iPhone: Masking an UIImage via touches

Hi, before rolling up my sleeves and starting an own solution: Is there already an approach for masking an image via touches? Touches are marked yellow in my example: If there is no existing solution, I will try it to inspect Apple's drawing sample app to get some selections on the image. ...

iPhone MPMusicPlayerController playback starting position

I'm using Media Player Framework to access the user's music library on iPhone. I would like to set the playback starting position so that I can start playing a song from 30 second mark, for example. I have trouble finding out how to do this. The MPMediaPlayerController only offers beginSeekingForward but that's not quite what I'm looki...

How to access other objects from within NSOperation? Threading issues lead to crash.

I have app that performs login to web service and then requests list of objects using sessionid received during Login. Appdelegate.h .... @property (nonatomic, retain) NSString *sessionId; AppDelegate.m: -(id)init{ queue = [[NSOperationQueue alloc] init]; [queue setMaxConcurrentOperationCount:1]; ..... } - (void)applicati...

Programmatically send to front/back elements created from interface builder

Hi, In interface builder, there are layouts options to send to back or send to front any elements such as UIButton, UIImage, UILabel etc... Now, I would like to do the same at runtime, programmatically. Is there an easy way to do that? I do not want to create different views, just play with the z-axis. Thank you. Yohann ...

Guess the touched UIImageView

I have multiple UIImageViews with userinteraction enabled. I am implementing touchesBegan, is there a way to guess which imageview was touched rather than making a rect based on all imageviews and check for the touch point existence in them? I also have assigned different tags to each imageview. ...

Why doesn't initWithRootViewController retain the viewController Class that is passed into it?

I have a custom viewController called SourceListViewController, and I'm adding it into a UINavigationController, the view of which is then added to the window of the iphone App. After passing the SourceListViewController to UINavigationController, I release the sourceListViewController. SourceListViewController *sourceListVC = [[Sourc...

Getting magnetic north from a xyz magnetometer (iPhone 3.0)

I'm actually reposting a question from the iphone development boards. I didn't ask it, but I found it when trying to find its answer. Nobody had yet responded there, so I thought I'd try posting it here. Thanks in advance for any help! Does anybody know any specifics about the algorithm of computing the magnetic heading from the raw ...

NSNotification Strangeness when used in conjunction with AsyncSocket

I'm using AsyncSocket to connect to a server from my iPhone App. In the delegate that received data from the server, I post a notification that would tell the tableView's delegate to trigger a reloadData on the tableView: - (void)onSocket:(AsyncSocket *)sock didReadData:(NSData*)data withTag:(long)tag { [[NSNotificationCenter defau...

How to add a subview in settings.bundle?

I want to show my copyright statement as a subview in one of the settings.bundle items. I've googled for this but no much help was found. Does anyone know how to do this? Thnaks a lot. ...

How to implement view sliding in and out in iPhone?

I would like to implement the effect of a view sliding in, much like the animation of a view being brought in by presentModalViewController, but the view only slides in to cover half the screen. I approached it this way: 1) Right before thew view should appear and slide in, addSubview the child view. Position it in such a way it's out...

UITableViewCell's imageView fit to 40x40

I use the same big images in a tableView and detailView. Need to make imageView filled in 40x40 when an imags is showed in tableView, but stretched on a half of a screen. I played with several properties but have no positive result: [cell.imageView setBounds:CGRectMake(0, 0, 50, 50)]; [cell.imageView setClipsToBounds:NO]; [cell.imag...

Basic iPhone pasteboard usage

I'm trying to put some plain text in the iPhone pasteboard. The following code doesn't seem to work: UIPasteboard *pboard = [UIPasteboard generalPasteboard]; NSString *value = @"test"; [pboard setValue: value forPasteboardType: @"public.plain-text"]; I'm guessing the problem is in the pasteboard type argument. Passing @"public.plain-t...

Instantiate a new instance of UIViewController within itself

I have an instance of UIViewController displaying a list of items. When the user selects an item I need to create a new instance of UIViewController (populated by a different list of items) and show it. At the moment I'm calling the constructor from within the didSelectRowAtIndexPath method RootViewController *rootViewController = ...

CocoaTouch : Localized Application Randomly Changing Language

I have followed Apple's documentation on localizing iPhone software, using the genstrings ruby script to create my strings file, and have localized all of my nib files. I also looked on both Apple's message boards, and around the net to try to find the solution. I have made sure that all strings files are UTF-16, and changed my build s...

Convert int to CGFloat

Any idea on how to convert int to CGFloat in objective C? ...

Are there any e-Books (or books) covering the iPhone SDK 3.0?

The iPhone SDK 3.0 has been in beta for a few months, so I would think that by now there would be some good reference/tutorial material floating around in the form of e-books (it may be a little too early for print books). So far, I only came across iPhone SDK Development from The Pragmatic Bookshelf. It covers the SDK up to version 3....

Using NSMethodSignature on iPhone (with Obj-C 2.0 properties)

Hey guys, I'm running the following code on my phone, where 'object' is a Cat, which is a subclass of Animal. Animal has a property 'color': NSLog(@"Object: %@", object); NSLog(@"Color: %@", [object color]); NSMethodSignature *signature = [[object class] instanceMethodSignatureForSelector:@selector(color)]; NSInvocation *invocation = [...

Can I increase the animation speed of presentModalViewController?

I'm writing a drawing application that shows a tools view controller when the user clicks an item in a toolbar. However, several of my beta testers have reported that the tools palate opens too slowly. I'm using the standard presentModalViewController:animated: call to display the tools, and I've tried wrapping it in a code block like th...

Updates to existing app

Hi, I have an App using sqlite. On first start, I copy the .db file into NSDocumentDirectory (so that I can make updates to it). In later versions, I plan to add new data to this database. How can I make sure, that with every application update (but not with every app start) the newest copy of this DB will be copied to NSDocumentDirecto...