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

UIBarButtonItem: Image offsets

I am trying to create custom back bar button item using image. I've done it this way: let image = UIImage(named: "Back") self.navigationBar.backIndicatorImage = image self.navigationBar.backIndicatorTransitionMaskImage = UIImage(named:…
Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70
0
votes
1 answer

How to get the curent UIEdgeInsetsMake?

I have created collection view cell via storyBoard,for the 4 and 5 inch screen i have set the UIEdgeInsetsMake as programatically,if the device is not 4 and 5,then my storyboard UIEdgeInsetsMake have to set for that. How to do it? This is my…
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47
0
votes
1 answer

How to add a Separator line to a UITableViewCell (Swift)

I have custom cells in a UITableView and by default they are separated by a separator line. How do I go about adding a second separator line? I'm trying to add one between a UIImage and a Text label. I've been using UIEdgeInsets but can't seem to…
user5034511
0
votes
0 answers

UIButton not highlighting the whole button when ImageEdgeInsets are set

I'm trying to have an UIButton with an image in the middle of it. I want this button to have edge insets of 10px. When I set these, I have the correct visual result but I can only click in a little area of this button. How can I have the same visual…
Aeradriel
  • 1,224
  • 14
  • 36
0
votes
1 answer

iOS UIPageViewController child view under Bottom Bar

I had an UIPageViewController embedded in a NavigationController embedded an TabBarController. I supposed every child view of the UIPageViewController fits the size within the UITabBarViewController. The first child view looks fine: Switch to the…
0
votes
1 answer

How to remove separator gap between UITableViewCells

I want to set an UIImageView on each of my custom UITableViewCell, however I want it to look like the images all join up. As it stands now I have moved the cell separator so that it doesn't cut over the top of the images, however I now need to work…
user843337
0
votes
2 answers

Image and Text locations in UIButton

Im trying to put a UIImage and text into a UIButton, by using UIEdgeInset to locate them. The problem is, changing one of the edgeinset setting will cause both the image and the text to change the position. Which means, I put the image to the…
user3435230
  • 53
  • 1
  • 6
0
votes
1 answer

Implement some insets in HTMLLabel but "drawTextinRect" get never called

I´m using HTMLLabel (https://github.com/nicklockwood/HTMLLabel) and i would like to implement some insets. So i wrote in the HTMLLabel.m file: - (void)drawTextInRect:(CGRect)rect { UIEdgeInsets insets = {0, 5, 0, 5}; [super…
Davis
  • 1,253
  • 4
  • 17
  • 38
0
votes
1 answer

Properly align elements in Notification Center widget using Auto Layout

I'm having difficulties obtaining the proper alignment of elements in my Notification Center extension. I would like to align the elements to respect the default margins applied - it should be left aligned with the first character in the app name,…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
0
votes
1 answer

Find bounds of UIViewController's view not obscured by UINavigationBar, UITabBar, (etc)

I can configure my UIViewController's edgesForExtendedLayout so that it will extend underneath content such as the navigation bar or tab bar. If I do this, is there some way to determine the frame that is not obscured? As a possible alternative, is…
Benjohn
  • 13,228
  • 9
  • 65
  • 127
0
votes
1 answer

Indenting UITextLabel in custom UITableViewCell

I have a custom UITableViewCell and I would like to indent the UITextLabel without indenting the separator's inset. I tried the following but it didn't yield the result I was looking for. How can I achieve this? Can I edit the auto-layout the…
Joseph
  • 9,171
  • 8
  • 41
  • 67
0
votes
1 answer

xcode6 storyboard uibutton image title laybout

how can i set button's image and title correctly position. now the storyboard preview like: I add title and image to the button and set title and image edgeinset to get picture layout. but the button'size is changed with the phone size. so i…
maple
  • 101
  • 1
  • 13
0
votes
1 answer

Add to UIScrollView.contentInset.top

In my attempt to Keep UISearchBar visible even if user is sliding down, I've: Added a UITableView & UISearchView as subviews of view. tableView's frame = view.bounds searchBar is locked to the bottom of topLayoutGuide with Auto Layout. But,…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
0
votes
0 answers

UIEdgeInsets not working exactly the same as expect

I've add a scrollView in the view controller and register keyboard show and hidden notifications - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.translucent = NO; [self…
pqteru
  • 451
  • 1
  • 7
  • 23
0
votes
1 answer

Using UIEdgeInsets in Xcode 6s Launch XIBs

Is it possible to use UIEdgeInsets in a XIB used as Launch Screen? When I try to subclass my UIButton I get the error "Launch Screen may not use instances of MyButton".
0x6368
  • 337
  • 2
  • 17
1 2 3
8
9