//
// ViewController.m
// wk
//
// Created by Mac on 16/8/22.
// Copyright © 2016年 Mac. All rights reserved.
//
控制器
#import "ViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *Button;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
//设置按钮的内边距
//1.设置内容
self.Button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
//2.设置图片
self.Button.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 10);
//3.设置标题
self.Button.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 5, 10);
}
@end
![这里写图片描述](http://img.blog.csdn.net/20160822194212016)
UIButton内边距
最新推荐文章于 2021-09-05 18:10:18 发布