简体   繁体   English

viewController中的tableView的圆角

[英]Rounded corners for a tableView in viewController

I can´t find out how to make rounded corners on the tableView I have in a viewController. 我找不到如何在viewController中的tableView上制作圆角的方法。

viewcontroller.m: viewcontroller.m:

I added the framework and imported: 我添加了框架并导入:

#import <QuartzCore/QuartzCore.h>

And also in voidDidLoad method: 而且在voidDidLoad方法中:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view.layer setCornerRadius:7.0];

}

Thanks in advance! 提前致谢!

this should work: 这应该工作:

   #import <QuartzCore/QuartzCore.h>
   self.view.layer.cornerRadius = 7;
   self.view.layer.masksToBounds = YES;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM