uikit

Is there an way to make an invisible UIButton that will still "be there" and catch touch events for my UIImageView?

I thought to be clever and just put an transparent UIButton over an UIImageView with the exact frame size, so that I can wire it up easily with any event I like, for example TouchUpInside, and make it call a action method of an view controller when the user touches it. Well, it works until alpha is below 0.1f. If I do 0.01f, it will not ...

Is it possible to change the app icon programmatically?

I want to make two different app icons, and programmatically switch betweem then. When the user quits the app without finishing an workflow-process, then I want to switch to an icon that will indicate that there's something undone when launching the app. Well, just theoretically, just for testing. I think that the icon file is just a no...

UINavigationController intercepting – popViewControllerAnimated:

So the the problem is that when someone touches the back button on the UINavigationControler, I would like to run some code to update the datasource. The problem is that i cant seem to find the right delegate to do it. only these are available on the nav controller delegate, and i want the 'didfinishshowing' type method. – navigationC...

How can I delay a method call for 1 second?

Is there an easy way to achieve that? I have an UIImageView that reacts on a touch event. When the touch is detected, some animations happen in the App. After one second I want to call another method. In this case, I can't use the animationDidStop selector. ...

UIKit SDK 3.0 error

Hi I am using iphone_sdk_3.0_beta_5__9m2735 SDK. When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1 While compiling my code I get following error from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7: In f...

Does it help to start intensive core animation blocks in another thread?

I have an scroll view with some sophisticated animations happening during scrolling. Although after 2 weeks of finetuning the performance is acceptable now, the scrolling is not 100% smooth when the animations happen. I know that core animation does animations in a background thread. But I wonder if it would help to split those animatio...

Is there an easy way to get the creator object of an object in objective-c / iPhone-OS?

Example: I have an class that inherits from UIImageView. An object creates an instance from that class. Now, that class needs a weak reference to it's parent. I could make an initializer where the object has to pass "self" to the new created object. But I feel that there is a better way. Is there any? ...

Dispelling the UIImage imageNamed: FUD

I see a lot of people saying imageNamed is bad but equal numbers of people saying the performance is good - especially when rendering UITableViews. See this SO question for example or this article on iPhoneDeveloperTips.com UIImage's imageNamed method used to leak so it was best avoided but has been fixed in recent releases. I'd like t...

Can't display selected text with different colors in UITextView, what should I do?

I want to display texts in UITextView with different colors and underline some of them (to show they are erroneous - commonly done in spellchecker) but that's not possible with the current version of UIKit. What other options should I pursue? I am thinking of subclassing UIScrollView (as I am dealing with a lot of texts) and blit the t...

Is there a way to remove the separator line from a UITableView?

Hi, I'm looking for a way to completely remove the separator line in a UITableView when in the plain mode. This is done automatically in grouped, but this also changes the dimensions of the table in a way that is hard to measure. I have set the seperator line color to colorClear. But this does not completely solve the problem. As I am t...

Can I hook into UISearchBar's Clear Button?

Hey guys, I've got a UISearchBar in my interface and I want to customise the behaviour of the the small clear button that appears in the search bar after some text has been entered (it's a small grey circle with a cross in it, appears on the right side of the search field). Basically, I want it to not only clear the text of the search ...

Is there an wrapper object for SEL?

I want to add selectors to an NSMutableArray. But since they're opaque types and no objects, that wouldn't work, right? Is there an wrapper object I can use? Or do I have to create my own? ...

Why is there no autorelease pool when I do performSelectorInBackground: ?

I am calling a method that goes in a background thread: [self performSelectorInBackground:@selector(loadViewControllerWithIndex:) withObject:[NSNumber numberWithInt:viewControllerIndex]]; then, I have this method implementation that gets called by the selector: - (void) loadViewControllerWithIndex:(NSNumber *)indexNumberObj { NSAu...

How do I set an uninitialized value in Objective C?

This question might be off base, but here's the problem I'm having: I'm trying to run an example from the iPhone SDK, and I'm running into an access violation. I've traced down some behaviour that I think is suspicious. Here's what the class looks like: @interface TableViewCell : UITableViewCell { @private UILabel *_earthqua...

Is there an way to pause an Core Animation and resume it at some time later?

I have several Core Animation's going on at the same time. They all have an context and an animation id, where the context is the object that's beeing animated (UIImageView objects). I would like to pause them, so that the animation just stops temporarily, and then when some things are done, resume it to complete it. These things happen ...

What's the easiest and fastest way of messaging 30 objects at the "same" time?

I have a UIScrollView where a lot of objects appear (UIImageView's) during scrolling. However, when the user is scrolling, I want to fire messages to all these objects, in order to tell them that they shall not do anything stupid. When the UIScrollView decelerates, some animations happen at the visible objects. When the user moves on fas...

Is it possible to put an OpenGL ES rendering view over an UIView, while the UIView shines through like if the OpenGL ES was a PNG with transparency?

I have no idea about it, but if that was possible (like Flash, for example), then that would be really cool. I have an view-based app where I need probably some OpenGL ES capabilities, but don't want to have fullscreen OpenGL ES. I just need it at certain small areas for drawing little charts and other stuff that may be hard to do with ...

UITextView is being cutting off top half of top line of text.

So I have a UITextView that is cutting off the text in the top line. and each subsequent return takes the next line to the same position where it is cut off. I cant see how this is happening following is all the configuration that i have set for the object. ResolveNotes = [[UITextView alloc] init]; ResolveNotes.backgroundColor = [UI...

Tweetie like swipe menu

How can I implement tweetie like swipe menu? I'm done with developing a tableviewcontroller with a customcell. The customcell implements touchesbegan and touchesMoved. It also reports swipe gestures via a selector to the parent tableviewcontroller. Now how should I go about hiding the "Swiped" cell and replacing it with a "swipe menu v...

UISegmentControl and UITableViewController animation.

How can I animate my "removal of tableviewitems" when the user changes between segments in the UISegmentControl? The behaviour should be similar to "Missed/All" calls in the Phone App. ...