cocoa-touch

Problems Queuing Concurrent & Non-Concurrent NSOperations

Hi there, I have an NSOperationQueue which contains 2 NSOperations and is set to perform them one after another by setting setMaxConcurrentOperationCount to 1. One of the operations is a standard non-concurrent operation (just a main method) which synchronously retrieves some data from the web (on the separate operation thread of cours...

Customizing icon position and title of UITabBarItem's (iphone sdk)

Hello, I have a tabBar, and I want to customise the items in the tab bar. I want to prevent the display of the title (easily achieved by setting the title to nil), and reset the icon position to be in the central vertical position. Does anyone have any idea of how this can be done? Thanks. ...

How to push viewcontroller ( view controller ) ?

Hi, Memory management is a very important issue in iPhone. So I am asking a very general question. There are two ways to call a the viewController of another class. Way 1: AnotherClassViewController *viewController = [[[AnotherClassViewController alloc] initWithNibName:@"AnotherClassView" bundle:nil] autorelease]; [self.navigationCo...

How to load PNG with alpha with Cocoa?

Hey guys, I'm developing an iPhone OpenGL application, and I need to use some textures with transparency. I have saved the images as PNGs. I already have all the code to load PNGs as OpenGL textures and render them. This is working fine for all images that don't have transparency (all alpha values are 1.0). However, now that I'm try...

For Iphone how to reference root view controller from currently loaded view, so view can be replaced/switched

I'm trying to switch a currently loaded view with a new one. I have 3 xib files and 3 sets of ViewControllerFiles. RootViewController loads correctly, and correctly loads HomeViewController. The line that errors currently is this [self.rootViewController.view insertSubview:gameController.view atIndex:1]; error: request for member 'v...

How to get an iPhone address book contact's emails as NSStrings?

I know that there can be multiple values for an email, but I'm not sure how to browse through them. I can get a person correctly. ABRecordRef person = // getting a person; NSString* emails = (NSString *)ABRecordCopyValue(person, kABPersonEmailProperty); ... what's next? If I try to print the emails variable I get: Emails: <NSCFType...

Cocoa-Touch: UIImageView.image display vs UIImage drawInRect:. The former looks horrible compared to the latter when scaling images.

I have one app, a UIImage*. I'm painting the image twice: Once in a table cell, which I'm drawing manually for performance reasons, so it's getting pained with [image drawInRect:CGRect..]; The 2nd time it's in a UIImageView. The image is approx 3x the size of the rect I'm painting in. Both the UIImageView frame and the passed rect ar...

iPhone MPMoviePlayer hide movie Control

hi i want hide movie control (Play - next - volume and ..)from MPMoviePlayer ... what can i do ? ...

NSOperationQueue and concurrent vs non-concurrent

I want to setup a serialized task queue using NSOperationQueue but I'm a little confused by the terminology discussed in the documentation. In the context of an NSOperation object, the terms concurrent and non-concurrent do not necessarily refer to the side-by-side execution of threads. Instead, a non-concurrent operation i...

Can I make my iPhone app's content searchable via Spotlight?

On MacOS X, you can write a Spotlight Importer so that your documents and content can be indexed and searched with Spotlight. I would like to write an iPhone app that generates content that can be searched with iPhone 3.0's new Spotlight search feature. Is this possible, or is this only available on MacOS X? ...

subview outside parentview frame events

Hi, I'm adding programmatically an UIView B to another UIView A. The A frame is {{0, 372}, {320, 44}}. B UIView is add at {0, -74} and is {320, 74} wide. My problem is that B touch events are not handled. More precisely touch events are handled to a sibling UITableView of UIView A wich ends at {0, 372} even if B UIview is displayed ov...

Predicting the resting offset in a UIScrollView after deceleration

I would like to be able to predict the final resting offset within a UIScrollView after a flick gesture. It doesn't need to be pixel-accurate, but close enough so that the user does not perceive a difference (i.e. it doesn't move excessively less or more than they are used to). I know someone will ask, so: Why? I have a table view-like ...

FBConnect facebook.stream.publish with NSDictionary problems

Hi, I have this code that can't send a Facebook request until now. NSDictionary *firstDict = [NSDictionary dictionaryWithObjectsAndKeys: @"image", @"Type", @"http://mysite.com/image.jpg", @"src", @"http://mysite.com/page.html", @"href", nil]; NSDictionary *secondDict = [NSDictionary dictionaryWithObjectsAndKeys: @"...

Will longer keys make an NSKeyedArchiver file significantly longer

When I fill in the encodeWithCoder: for objective c classes for an iPhone app will it make make the archive file larger if I use long keys as opposed to short keys for all of my variables? For example if I use really long keys like this: [coder encodeBool:myBoolean forKey:@"My_Excesively_Long_Boolean_Key"]; will it make the archive f...

Reusing UIViewController for modal and non-modal situations

I have a UIViewController — let's call it "FormController" — which is simply a form that edits an object. I want to use it in 2 different situations: Creating a new object — using using UINavigationController's presentModalViewController: method. Editing an existing object — push the view controller onto the UINavigationController st...

Strip Non-Alphanumeric Characters from an NSString

I'm looking for a quick and easy way to strip non-alphanumeric characters from an NSString. Probably something using an NSCharacterSet, but I'm tired and nothing seems to return a string containing only the alphanumeric characters in a string. ...

Why no animation in PageControl project?

I'm using the PageControl project, which is on Apple's dev site. I've added a flip view to the project and an info icon to the top right of each view/page. For some reason, only the first page is able to animate the flipping. Page 2 on still shows the flipped page but does not animate. To make sure it isn't anything special about pag...

New to Core Data for iphone

I am new to the iphone platform and am creating an app that retrievals a rss feed and displays it in a UITableView. I have gotten this working perfectly (or rather, the way I wanted). What I was thinking was I would store the current feed items on the phone so that it would initally load the old items it has stored while it got the new f...

Xcode 3.2 find and replace in selected text

Is it possible to find and replace in selected text in Snow Leopard Xcode 3.2? There always use to be an option for selected text. Really frustrating. Thanks. ...

Cocoa-Touch: How to set the interpolation quality to be used by a UIImageView?

I have a UIImageView showing a image that is larger than it's frame. It's set to rescale the image to fit it's frame. But, the image is scaled with a low quality filter. I've read here that this is caused by it using a low interpolation quality. How can I get it's context to CGContextSetInterpolationQuality to kCGInterpolationHigh? ...