uikit

UIView clipsToBounds property: Does it improve performance?

The documentation says that the clipsToBounds property of UIView will clip the drawing to the bounds, or more precisely that the subview can't draw outside of the bounds of the superview. Sounds nice, but what does that mean in practise? If I set that to YES, then my subview will automatically only draw those parts which are not outside...

How can I iterate over image resources inside one group?

In my "Groups & Files" I have created something like that: images > gui images > foo images > foo > bar now I want to iterate over all images that are placed in images > foo > bar. Is that possible? I am afraid it's not, because the system did never care much about "folders" when loading a file. ...

How can I store a string in an sqlite3 Database on iPhone OS?

I'd like to see some sample code for that. Any good Tutorial-Link is also welcome. ...

What's the best approach to change view properties due to accelerometer-value-changes?

I want to do this: If the device moves (accelerometer values change), then I want to adjust some values in my view according to that movement. Would I invoke a method every time an accelerometer value changes? I believe that would be a bad idea, since they might refresh too often. ...

Are there any third-party libraries to do cool view transitions in iPhone OS?

I don't really like that flip-transition. It's boring. I'd like to see something cool, like water effect, fog, or whatever. Is there something available or do I have to (re)invent the wheel for that? ...

Are there any good examples for how to use the accelerometers in iPhone OS?

I think that there are some issues with the earth Gravity, so I wonder if there are any examples where the accelerometers work by subtracting these. ...

How can I set the paging behavior of an UIScrollView with pagingEnabled=YES?

The documentation says: If the value of the property is YES, the scroll view stops on multiples of the view bounds when the user scrolls. The default value is NO. well it's really nice that it stops on multiples of the view bounds when the user scrolls ;) But how many multiples? how's that beeing calculated? I get a really w...

Is there a way of setting some kind of z-index for z-position of UIImageView objects?

I'm building up a grid of images, and I start at the top, creating UIImageView objects all over the place. Now I want that they overlap a little bit, but the last ones I draw are the ones most on top. I'd like to set the z-position programmatically, so that the first ones I draw will be the ones most on top. ...

How can I outsource view-change-operations from my view controller upon accelerations?

I have an view controller class. I want to do some things in my view when the accelerometer detects movement and calls the accelerometer:didAccelerate: method in the delegate object. That delegate object is the problem here in my brain. Currently, my brain is freezed and I don't get it what would be better. Let me know what you think! ...

iPhone image button

Hi, I want to use image buttons in my iPhone application. Could you please let me know if there is any article I can read on this. Thanks. ...

Why should I check for [self class] == [LevelAppDelegate class] in an initialize method?

In the AppDelegate of the BubbleLevel example from Apple they do something like this: + (void)initialize { if ([self class] == [LevelAppDelegate class]) { // Register a default value for the instrument calibration. // This will be used if the user hasn't calibrated the instrument. NSNumber *defaultCalibratio...

mysterious +initialize method in UIApplicationDelegate protocol: Why can't I see it in the documentation?

In the BubbleLevel example from apple they implement an +initialize method. They say: +initialize is invoked before the class receives any other messages, so it is a good place to set up application defaults But when I try to look it up in the UIApplicationDelegate protocol documentation, they don't even mention that +initial...

What describes the Application Delegate best? How does it fit into the whole concept?

Well I think to know what the App Delegate does. It has some nice methods like -applicationDidFinishLaunching which will be called when the app has finished launching, and so on. But what's that actually? Is that some object instantiated in the UIApplicationMain function? And how does it work that every class in my app has access to tha...

How can I round a float value to 2 post decimal positions?

I've got a float value from an accelerometer which looks like this: -3.04299553323 I'd like to get -3.04 for example. Is there an easy way for rounding that float value? Edit: http://stackoverflow.com/questions/752817/rounding-numbers-in-objective-c ...

How can I invoke a method upon scrolling-events in a UIScrollView?

I've got an UIScrollView object where I want to implement some effects happening when the user is scrolling. Is there a way to invoke a method on my view controller class every time the user starts a scroll action or is scrolling? What I need is also the current scrolling position. I am almost sure that there is something useful availab...

How can I implement a circular scrolling mechanism?

I'm having some images from which the user should choose one. Now I don't want to just offer an flat scrolling area with a boring grid. Instead, I'd like to show up a wheel that contains those images. At the top would be a marker indicating the selection. Something similar to the Pickers. The problem is not the rotation stuff; I'd use s...

How can I set the scrolling position of an UIScrollView?

I've seen the setContentOffset:animated: method. Is that going to scroll to a specific position, or what does that "offset" mean? ...

Why does my -scrollViewWillBeginDragging method of my UIScrollView delegate return such a strange contentOffset value?

PROBLEM SOLVED! STUPID TYPO IN MY CODE! That's my method of my UIScrollView delegate: - (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView { NSLog(@"contentOffset: %f", activeScrollView.contentOffset); } Output in console is like: 2009-05-06 23:04:45.731 Demo[4851:20b] contentOffset: 21080643979530096233938944.00...

iPhone application keyboard

Hi All, I want to add buttons like previous, next, done, Go when I am filling out some text fields in my iPhone application. Could you let me know how can I do that? Thanks. ...

How can I invoke a method automatically 20 times per second?

From JavaScript I am used to create an interval and specify the delay for re-calling the function, until I stop the interval. Is there something similar available on the iPhone? Any good links are highly appreciated. This goes to community wiki. ...