add message exercises
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// GiGaNavTitileView.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/8/23.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaNavTitileView : UIView
|
||||
- (id)initWithString:(NSString *)str frame:(CGRect)frame;
|
||||
@end
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// GiGaNavTitileView.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/8/23.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaNavTitileView.h"
|
||||
|
||||
@implementation GiGaNavTitileView
|
||||
|
||||
- (id)initWithString:(NSString *)str frame:(CGRect)frame
|
||||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)];
|
||||
label.textColor = [UIColor redColor];
|
||||
label.text = str;
|
||||
label.font = [UIFont boldSystemFontOfSize:18.0f];
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:label];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user