Questions tagged [bounds]

In user interfaces and graphics, bounds refer to the size and location of a window or view.

In user interfaces and graphics, bounds refers to the size and location of a window or view. In 2D graphics, this is broken down into four parts. Combinations often used include:

  • x-location, y-location, width, and height.
  • x-location, y-location, right, bottom.

Likewise, in 3D graphics, bounds are often broken into 6 components:

  • x, y, z, width, height, depth
769 questions
3
votes
2 answers

UIView : frame size different of bounds size?

Is it possible to have an UIView with its bounds size different of its frame size? I'm trying to create an UIView with "{{0,0},{320,367}}" frame and "{{0,15},{320,337}}" bounds but i can't get it done using setBounds() and setFrame(). I got from the…
Vivi
  • 972
  • 1
  • 14
  • 30
3
votes
1 answer

UIScreen bounds and applicationFrame difference between iOS6 and iOS7

Using iPhone4s iOS7, Screen orientation is Landscape -Build an application with below SDKs I built the application with iOS6 SDK and iOS7 SDK, and checked each of the screen resolution. Below shows the result: iOS6 SDK: [[UIScreen mainScreen]…
TGT
  • 78
  • 5
3
votes
2 answers

Changing a view's bounds doesn't change where it draws

In viewDidLoad, I create a UIView at 100,100 with a size of 200x200, then change it's bounds to have an origin of -100,-100. I had supposed that this would either move the entire view back to the top left, or only draw a smaller rectangle for the…
nevan king
  • 112,709
  • 45
  • 203
  • 241
3
votes
1 answer

JavaFX: optimal width of TextFlow with word-wrap

With Textflow.setMaxWidth(double) I can achieve text wrapping. But how can I adjust the width of TextFlow afterwards so that it is based on the actual wrapping position? In other words, how to let the TextFlow bounds snap to all of its children Text…
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
3
votes
1 answer

Predefined 2D array without bounds?

In a class, i want to create an array (predefined because it's in a header class) without specifying any bounds until the class has an object created with it's type. For example: class RandomClass{ public: int myarray[][];//Remember this is a 2D…
killerloader
  • 139
  • 2
  • 10
3
votes
8 answers

UITableView in UINavigationController gets under Navigation Bar after rotation

This is Portrait: This is Landscape I've tried this on rotation with no success: self.tableView.autoresizesSubviews = YES; self.tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
Jorge
  • 2,156
  • 2
  • 22
  • 29
3
votes
1 answer

How to set the CAlayer bounds from my view controller for multiple subview

I am new to iOS programming. Please help me to sort out the following issue I have one set of view controller(.h, .m and .XIB) I have one set of view(.h&.m) 3.The view class is responsible for drawing gauge using -->drawRect -->CALayer and…
Brijesh Singh
  • 739
  • 1
  • 6
  • 23
3
votes
1 answer

How to lookup screen-bounded tile indices in a rotated tilemap?

Normally, an Axis-aligned (rotation = 0) tilemap is easy to iterate through the visible tiles on the screen. But how do you "cull" or filter the tile indexes when the entire tilemap is rotated? NOTE: This is for improving a tile-rendering class in…
chamberlainpi
  • 4,854
  • 8
  • 32
  • 63
3
votes
2 answers

How do I position UIView in superview?

Im adding a UIImageView with a UIImage which I wish to appear in the center top of the main UIView. I will be using a UIPageControl to swipe that view off to the left and bring in the new one from the right. I have added the UIImageView which…
marciokoko
  • 4,988
  • 8
  • 51
  • 91
3
votes
2 answers

Android bound service and AIDL service

I read about bound service and AIDL based service on Android developer guide Both seem to allow other components to bind to and perform Interprocess communication Bound service allows components (such as activities) to bind to the service, send…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
3
votes
1 answer

CALayer frame.size not equal to bounds.size

I happened to something strange to me on CALayer.And finally found the CALayer's frame.size not equal to its bounds.size, which I couldn't understand.I know frame is in the super's coordinate system and bounds is its own coordinate,and the usual…
keywind
  • 1,135
  • 14
  • 24
2
votes
3 answers

Scale a UIView Horizontally

I'm trying to scale a view Horizontally but i'm not getting the results i expected. view.bounds = CGRectMake(view.bounds.origin.x, view.bounds.origin.y , view.bounds.size.width * scaleX, view.bounds.size.height ); view.center =…
Felipe Conde
  • 2,024
  • 23
  • 26
2
votes
3 answers

Get the bounds of any window on the desktop in Screen Coordinates, is it possible?

I am searching for a way to get the screen coordinate bounds of any arbitrary window that may be displayed on the desktop at any time on a Windows machine. For instance, say you have a pdf document open in adobe on the desktop, I'd like to be able…
kevin
  • 45
  • 5
2
votes
1 answer

UITableView bounds after rotate

I have a UITableViwe with autoresizingMask = UIViewAutoresizingFlexibleWidth. Some of the cells contain a UITextField. When the device is rotated, the table and the text fields resize correctly to the full width of the device, but when I check the…
Amiram Stark
  • 2,208
  • 22
  • 32
2
votes
1 answer

CoreText flip coordinates self.bounds.size.height error bounds

I am drawing text in the view with CoreText. To learn this I used a tutorial, but suddenly it uses self.bounds.size.height, in a part where it flips the coordinate system. When I was duplicating the code in Xcode it gave an error because 'bounds'…
user744149
  • 35
  • 4