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...
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.
...
I'd like to see some sample code for that. Any good Tutorial-Link is also welcome.
...
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.
...
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?
...
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.
...
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...
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.
...
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!
...
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.
...
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...
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...
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...
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
...
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...
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...
I've seen the setContentOffset:animated: method. Is that going to scroll to a specific position, or what does that "offset" mean?
...
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...
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.
...
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.
...