Questions tagged [uiedgeinsets]

UIEdgeInsets is an iOS data type that defines inset distances for views.

UIEdgeInsets defines inset distances for views. Edge inset values are applied to a rectangle to shrink or expand the area represented by that rectangle. Typically, edge insets are used during view layout to modify the view’s frame. Positive values cause the frame to be inset (or shrunk) by the specified amount. Negative values cause the frame to be outset (or expanded) by the specified amount.

It is available in iOS 2.0 and later.

Source: UIEdgeInsets

Related SO questions:

  1. How does UIEdgeInsetsMake work?

  2. UIEdgeInsetsMake creating a weird band on the cell, and I don't know how to fix it

  3. Shrink UIButton's frame after setting UIEdgeInsets

Related tags:

132 questions
0
votes
1 answer

How can I remove or change the UIEdgeInset of these two UITableViewCellSeparators?

I have this UITableViewController, and I wanted to change the separators' edge insets. I have managed to change the ones between cells, but the two line I have shown in the image below is not changing. The top one is the line just below the section…
Septronic
  • 1,156
  • 13
  • 32
0
votes
1 answer

Can't add properly capinsets in Xcode

I'm working on custom keyboard for iOS 8. And i have image for key buttons background. For example lets take this one -> In future this image will have rounded corners. The problem is with space button if a'm adding this image for background image…
Vasyl Khmil
  • 2,548
  • 1
  • 20
  • 36
0
votes
1 answer

Prevent UICollectionViewFlowLayout from calculating its own sectionInsets with variable size items

When I specify sectionInsets, for example: flowLayout.sectionInset = UIEdgeInsetsMake(80, 50, 10, 20); And all items in my UICollectionView are the same size, the sectionInsets are applied as expected. When all items in the UICollectionView are not…
0
votes
1 answer

How to determine a UIScreenEdgePanGestureRecognizer's frame

I'm trying to figure out what the actual point values are when you specify UIRectEdgeRight, etc. when you set up a UIScreenEdgePanGestureRecognizer. It appears I cannot simply NSLog anything about the UIScreenEdgePanGestureRecognizer, as there's no…
klcjr89
  • 5,862
  • 10
  • 58
  • 91
0
votes
1 answer

UICollectionViewController UIEdgeInsets wired behaviour

Actually, Working fine for default System . Total dataSource count is 7 items When I just changed to the UIEdgeInsets to left for insetForSectionAtIndex. UIEdgeInsets works fine but Visible area of the CollectionView equally centralised, Missing…
Kumar KL
  • 15,315
  • 9
  • 38
  • 60
0
votes
1 answer

From iOS6 to iOS7 Issue with edge inset

I have a problem with title vertical alignment of some UIButtons that is over the central line of the button, this happened because I've used a custom font that have a wrong vertical alignment, I fixed this problem in iOS6 with titleEdgeInsets…
Mirko Catalano
  • 3,850
  • 2
  • 26
  • 39
0
votes
2 answers

UIButton: How to set image and text using imageEdgeInsets and titleEdgeInsets?

I had an application in which I am using a UIButton with a title and UIImage. Their alignment seems to be first title then after that the UIImage. I had tried this: [dropdownbutton setImage: [UIImage imageNamed:@"down_sml_arrow.png"] …
hacker
  • 8,919
  • 12
  • 62
  • 108
0
votes
1 answer

Why does the UIButton move the title label all the way to the right when I set content insets to move it to the bottom?

I'm trying to make a UIButton with an image above the text. To that end, I tried setting the edge insets of the button as so: [button setImageEdgeInsets:UIEdgeInsetsMake(0.0f, 0.0f, 10, 0.0f)]; [button setTitleEdgeInsets:UIEdgeInsetsMake(10, 0.0,…
s73v3r
  • 1,751
  • 2
  • 22
  • 48
0
votes
1 answer

Resize UIBarButtonItem with UIAppearance in landscape (UIEdgeInsets)

I am using UIAppearance as introduced in iOS 5 to set a custom background image for all the BarButtonItems in my app. The following code is what I use to set it for the back button, and it works fine in portrait mode. However, when the phone is…
Josh Sherick
  • 2,161
  • 3
  • 20
  • 37
0
votes
1 answer

Draw UIImage with resizableEdgeInsets in center with stretched sides

I thought it was possible, since UIImageView does this just fine. Can I draw a UIImage in UIView's drawRect: method in a way that I center the image horizontally, and the sides of the UIImage are then stretched to fill the reminder of the UIView? -…
runmad
  • 14,846
  • 9
  • 99
  • 140
0
votes
1 answer

Sliding Search Bar Down and Simultaneously Resizing Sibling View

I have a UIView -- call it HomeView that contains a UITableView and a UISearchBar. That is, they are subviews. These are added in viewDidLoad for HomeView. A picture is worth a thousand words: As can be seen from these screenshots, the first item…
Steve Ross
  • 4,134
  • 1
  • 28
  • 40
-3
votes
1 answer

convert Swift 2.3 to Swift 4

I am new in Swift 4 and I want to resolve the Swift version 2.0 Project with Uitextview error here is error in Swift 4 let textView = UITextView(frame: CGRectInset(view.bounds, 10, 10)) I will change with 'CGRectInset' has been replaced by…
user2296278
  • 528
  • 1
  • 4
  • 17
1 2 3
8
9