All Questions

291
votes
7answers
191119 views

UIView frame, bounds and center

I would like to know how to use these properties in the right manner. As I understand, frame can be used from the container of the view I am creating. It sets the view position relative to the contai...
210
votes
10answers
133282 views

When is layoutSubviews called?

I have a custom view that's not getting layoutSubview messages during animation. I have a view that fills the screen. It has a custom subview at the bottom of the screen that correctly resizes in Int...
42
votes
5answers
6595 views

Why can't a Java type parameter have a lower bound?

I gather that you cannot bind a Java generics type parameter to a lower bound (i.e. using the super keyword). I was reading what the Angelika Langer Generics FAQ had to say on the subject. They say ...
191
votes
3answers
101988 views

UIView's frame, bounds, center, origin, when to use what?

UIView has the properties frame, bounds, center, and origin, and they all seem to be interrelated. Most of the time, I deal with frame when setting the position and size of a UIView. I understand th...
78
votes
1answers
38262 views

How does clipsToBounds work?

I would like to know how to use the UIView property clipsToBounds. The official documentation says the following: clipsToBounds property A Boolean value that determines whether subviews are ...
28
votes
6answers
24995 views

Getting the bounds of an MKMapView

In order to setup a query to an external server I want to get the bounds of the current Map View in an iPhone app I'm building. UIView should respond to bounds but it seems MKMapView doesn't. After se...
12
votes
5answers
12314 views

How to get bounds of a google static map?

How to get bounds in degrees of google static map which has been returned, for example, for following request http://maps.googleapis.com/maps/api/staticmap?center=0.0,0.0&zoom=10&size=640x640...
17
votes
1answers
11615 views

Android Google Maps get Boundary Co-ordinates

I am using Google Maps v2 in my application. When the user pans or zooms on the screen I would like to get the area of the map based on which I want to fetch the POI only in the screen view part. I we...
46
votes
6answers
40785 views

How to iterate over an array and remove elements in JavaScript

I have an array of elements and need to remove certain ones from it. The problem is that JavaScript doesn't seem to have a for each loop and if I use a for loop I run into problems with it basically t...
11
votes
3answers
6222 views

C++: Vector bounds

I am coming from Java and learning C++ in the moment. I am using Stroustrup's Progamming Principles and Practice of Using C++. I am working with vectors now. On page 117 he says that accessing a non-e...

Previous Next