//
// ViewController.h
// test_category_01
//
// Created by admin on 4/20/16.
// Copyright © 2016 jeffasd. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
{
NSUInteger _viewInsetTop;
}
@property (assign, nonatomic, readonly)NSUInteger viewInsetTop;
@end
//
// ViewController.m
// test_category_01
//
// Created by admin on 4/20/16.
// Copyright © 2016 jeffasd. All rights reserved.
//
#import "ViewController.h"
#import "UIView+Jeffasd.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.viewName = @"sdfsdf";
NSLog(@"the viewName is %@", self.view.viewName);
_viewInsetTop = 122;
NSLog(@"the top is %lu", (unsigned long)self.viewInsetTop);
}
//- (NSUInteger)viewInsetTop{
// return _viewInsetTop;
//}
//
//- (void)setViewInsetTop:(NSUInteger)viewInsetTop{
// _viewInsetTop = viewInsetTop;
//}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
//注意这里的self.viewInsetTop打印出的值就是_viewInsetTop的值,从其set和get方法就能判断出来