iphone

Just in theory: How is the alpha component premultiplied into the other components of an PNG in iPhone OS, and how can it be unpremultiplied properly?

Actually, I thought that there would be an easy way to achieve that. What I need is pure alpha value information. For testing, I have a 50 x 55 px PNG, where on every edge a 5x5 pixel rectangle is fully transparent. In these areas alpha has to be 0.Everywhere else it has to be 255. I made very sure that my PNG is created correctly, and i...

How can I draw an CGImageRef context on the screen?

I have a beautiful CGImageRef context, which I created the whole day to get alpha values ;) It's defined like that: CGContextRef context = CGBitmapContextCreate (bitmapData, pixWidth, pixHeiht 8, pixWidth, NULL, kCGImageAlphaOnly); So for my understanding, that context represents somehow my image. But "virtually", non-visible somewhe...

Is it possible to have more then one animation delegates at the same time?

I'm concerned that this is impossible, because +setAnimationDelegate: of UIView is a class method. But maybe I am wrong with that? Background: The problem is, that I have many objects of the same class, and I want to implement a method which does some nice animations specially for that object. Those animations are a little complex and c...

What kind of value can I set in the context parameter for UIView +beginAnimations:context:?

I don't understand this: + (void)beginAnimations:(NSString *)animationID context:(void *)context (void *) ----> what kind of data can I provide here? ...

perfomSelector: withObject: afterDelay: can I ask for a low priority?

Is there some way when sending this message to specify that I rather have my selector performed after all pending UI events, if any? Ie. give my aterDelay timer a lower priority in the event queue. ...

Three20 TTTableViewController with a TTThumbsTableViewCell

It seems that you must use the TTThumbsViewController to accomplish this. However, in the example code, TTThumbsViewController is only ever used to manage a scrollview of thumbs. How do you configure it to display cells instead? _______Original Question_______ Has anyone used the Three20 source and made a tableview (not Fields)? I am ...

Saving reference to UITableViewCell

I have 5 cells in a tableview that are all custom. Meaning, I've created a xib with a tableviewcell and created a corresponding cellController. The xib has two labels named name and size. The user taps a row, triggering didSelectRowAtIndexPath. From there a timer is started. At some point the timer finishes. Here I need to assign te...

legal question about cellphone apps

Let's say I hire someone to build an app on the iPhone and it turned out to be a cash cow. What's stopping the developer from releasing a tweaked version that you paid him to make? Is there some sort of contract the developer has to sign? ...

iPhone - AVAudioPlayer, kAudioSessionCategory_AmbientSound and iPod music

Hi, I'm using the following Audio Session in my app delegate: AudioSessionInitialize(NULL, NULL, NULL, self); UInt32 sessionCategory = kAudioSessionCategory_AmbientSound; AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), AudioSessionSetActive(true); I want the user to be able to play iPod...

Resetting custom UITableViewCell height when iPhone is rotated

I am overloading the delegate method -tableView:heightForRowAtIndexPath: and using -sizeWithFont:constrainedToSize: to programmatically set the height of the cell, based on the text in that cell: - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { switch (indexPath.section) { case(kAbo...

Change to another view from tableview with a navigationcontroller placed in a tabbarcontroller

Hello experts! I recently found a good tutorial about how to place a navigation controller within a tabbarcontroller("The nib way"). http://twilloapp.blogspot.com/2009/05/how-to-embed-navigation-controller.html I continued with the second step and added a tableviewcontroller to the navcontroller. What I don't understand, is how I can...

hire iPhone dev and be sure for the future

Hello I'm thinking to hire an iPhone developer for creating an app for my site so the users could have a more easy navigation to it with their iPhone. If I'm not wrong, the app will be uploaded to the app store through the account of the developer. I want to ask how will I be positive that the app will have me as an owner and not have...

512x512 Texture causing huge GPU stress on iPhone, despite tiling

I'm testing my simple OpenGL ES implementation (a 2D game) on the iPhone and I notice a high render utilization while using the profiler. These are the facts: I'm displaying only one preloaded large texture (512x512 pixels) at 60fps and the render utilization is around 40%. My texture is blended using GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALP...

How can I reset a layer transformation to the original state after I did some animations and transformations?

I have a image that rotates around a few times by random and then disappears. After it appears again, I want it to be in the original state. Not rotated. I would keep track of how many rotations I applied randomly and then calculate how many radians I have to re-do that. But I slightly remember from the big docs that there was some ident...

Best way to make a UITextField "appear"

I'd like a UITextField to appear when a button is pressed. Unfortunately, I can't hide it in Interface Builder and then set the hidden property to NO later because "ibtool fails with exit code 5" if you try to hide a UITextField. I'll try to do this in code but wondering if I may be missing something or making a grave UI error by attem...

How can I recognize a tap on a UIImageView-subclass inside a UIScrollView?

I tried it with this code in my UIScrollView-subclass: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"he/she touched me"); } I also made sure that in the initialization of my view, this gets called: self.userInteractionEnabled = YES; But when the scroll view doesn't move and i tap on my subview a few...

Moving 50 Sprites in Cocos2d

I have about 50 small sprites I want to move around a layer. I've been looking at a couple of different options. What would be the most efficient way of doing this? (They will be constantly moving). I've looked at PathAction ( http://code.google.com/p/cocos2d-iphone/issues/detail?id=63 ) I've also thought about just a straight up [sp...

Memory management and performSelectorInBackground:

Which is right? This: NSArray* foo = [[NSArray alloc] initWithObjects:@"a", @"b", nil]; [bar performSelectorInBackground:@selector(baz:) withObject:foo]; - (void)baz:(NSArray*)foo { ... [foo release]; } Or: NSArray* foo = [[[NSArray alloc] initWithObjects:@"a", @"b", nil] autorelease]; [bar performSelectorInBackground:@selec...

Most recent search results join in Core Data

This is a follow up question to a previous post on saving recent searches with Core Data. To group search results, I have an Entry entity and History entity. Entry.history is a relationship to History. History.entries is a to-many relationship to Entry (the inverse of Entry.history). History has a date attribute createdAt. I am trying t...

iPhone API for power, configuration parameters

I'm just getting started with some iPhone apps, and I'm not finding the API documentation particularly easy to find my way through. I'm currently looking for APIs to do things like turn the 3G network on and off turn Bluetooth on and off set brightness and so on. Could some kind soul p[oint me to the right documents, or even better...