切小标签圆角 设置导航条字体样式

切小标签圆角

    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.markLabel.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = self.markLabel.bounds;
    maskLayer.path = maskPath.CGPath;
    self.markLabel.layer.mask = maskLayer; 

 设置导航条字体样式

 [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:20]}];
   字体大小、颜色
 NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
                                [UIColor whiteColor],
                                NSForegroundColorAttributeName, nil];
    [self.navigationController.navigationBar setTitleTextAttributes:attributes];

进入横屏

-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
-(NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskLandscapeRight;
}

  汉字转拼音

    NSMutableString *mutableString = [NSMutableString stringWithString:person.name];
   CFStringTransform((CFMutableStringRef)mutableString, NULL, kCFStringTransformToLatin, false);
    mutableString = (NSMutableString *)[mutableString stringByFoldingWithOptions:NSDiacriticInsensitiveSearch locale:[NSLocale currentLocale]];

pt: point

px: 像素

pt 和 px 的转换

1.3g 3gs: 1px = 1pt

2.4s, 5, 5s, 5c, 6, 6s  1pt = 2px

3.6plus, 6s plus  1pt = 3px

      添加边框 切圆角

        text.layer.cornerRadius = 5;

        text.layer.masksToBounds = YES;

        text.layer.borderWidth = 1;

        text.layer.borderColor = [UIColor blueColor].CGColor;

        text.borderStyle = UITextBorderStyleRoundedRect;

        点击按钮高亮

    _button.showsTouchWhenHighlighted = YES;

 
时间: 2024-08-25 10:49:29

切小标签圆角 设置导航条字体样式的相关文章

设置导航条标题及背景图片

#import "XMGNavigationViewController.h" @interface XMGNavigationViewController () @end @implementation XMGNavigationViewController + (void)load { UINavigationBar *navBar = [UINavigationBar appearanceWhenContainedIn:self, nil]; // 只要是通过模型设置,都是通过富

iOS-笔记 设置导航栏的样式

//设置导航栏字体及颜色 [self.navigationController.navigationBar setTitleTextAttributes: @{NSFontAttributeName:[UIFont systemFontOfSize:17], NSForegroundColorAttributeName:[UIColor whiteColor]}]; //设置导航栏背景颜色 self.navigationController.navigationBar.barTintColor

BPM实例分享:如何设置表单字体样式

系统版本:V10.0 一些业务场景中,时尔需要改变表单字体 那如何设置表单字体样式? 本文将会针对全局表单和单个表单进行阐述! 1.全局表单:  修改WFRES\CSS\MvcSheet.css ,在body节点里面增加 font-family:"字体名" !important;  2.单个表单: 添加以下样式body{    font-family:"字体名" !important;  } PS:若设置后没有变化,按F12,并查看控制整个页面的div,找到相应的C

设置状态条的样式Demo

实现的效果: 由效果知状态条的颜色有黑色变为了白色 //设置状态条的样式 - (UIStatusBarStyle)preferredStatusBarStyle { returnUIStatusBarStyleLightContent; } //修改navigationBar的颜色 self.navigationBar.barTintColor = [UIColor   colorWithRed:79 / 255.0 green:195 / 255.0 blue:137 / 255.0 alph

网页设置导航条

如果浏览器可使用HTML5,则使用<nav>标签(IE9+支持):若要兼容低版本浏览器,就要使用<div>标签. 垂直的导航条 1 /*list-style:none;是清除ul标签自带的样式,不设置高度height是因为可以靠li来撑开*/ 2 ul{list-style:none;width:100px;} 3 /*text-decoration:none;清除a标签的下划线:display:block;将a标签变成块元素,这样才能给a标签设置宽高和背景*/ 4 a{text-

设置导航条标题的颜色

效果图: 代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"I love you"; //改变导航条标题的颜色为红色 [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [

html网页好看字体,css设置各种中文字体样式

网页字体样式华文黑体:STHeiti网页字体样式华文楷体:STKaiti网页字体样式华文宋体:STSong网页字体样式华文仿宋:STFangsong网页字体样式黑体:SimHei网页字体样式宋体:SimSun网页字体样式新宋体:NSimSun网页字体样式仿宋:FangSong网页字体样式楷体:KaiTi网页字体样式仿宋_GB2312:FangSong_GB2312网页字体样式楷体_GB2312:KaiTi_GB2312网页字体样式微软正黑体:Microsoft JhengHei网页字体样式微软雅

IOS设置导航栏字体大小及颜色

方法一: 自定义视图,定义一个lable,相关属性在lable里设置 核心方法: self.navigationItem.titleView = titleLabel; 方法二:用系统方法直接设置 [self.navigationController.navigationBar setTitleTextAttributes:@{ NSFontAttributeName:[UIFont systemFontOfSize:20], NSForegroundColorAttributeName:Whi

设置导航栏字体大小,颜色和加粗字体的方法

[self.navigationController.navigationBar setTitleTextAttributes:       @{NSFontAttributeName:[UIFont boldSystemFontOfSize:20.0f],// 红色区域为字体加粗方法        NSForegroundColorAttributeName:[UIColor blackColor]}];