[Code Note] iOS-automatically generate table effects, code note ios-table
I ,.
2. Engineering Drawing.
3. Code.
RootViewController. h
#import <UIKit/UIKit.h>#import "LabelOnBackImage.h"@interface RootViewController : UIViewController{ LabelOnBackImage *labelFirst;}@end
RootViewController. m
# Import "RootViewController. h "@ interface RootViewController () @ end @ implementation RootViewController-(id) initWithNibName :( NSString *) bundle :( NSBundle *) handle {self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; if (self) {// Custom initialization} return self;}-(void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. self. title = @ "LabelOnBackImage"; NSArray * titleArray = [NSArray arrayWithObjects: @ "name", @ "Age", @ "class", nil]; NSArray * contentArray = [NSArray arrayWithObjects: @ "lucy", @ "20", @ "0331", nil]; labelFirst = [[LabelOnBackImage alloc] initWithFrame: CGRectMake (5,100,300,400) titleArray: titleArray contentArray: contentArray titleColor: nil contentColor: nil]; [self. view addSubview: labelFirst];}-(void) didReceiveMemoryWarning {[super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated .}