//
Viewcontroller.m
ui- Find color block game
//
Created by Jzq_mac on 15/7/22.
Copyright (c) year Jzq_mac. All rights reserved.
//
#import "ViewController.h"
@interfaceviewcontroller ()
{
Nsarray *colrlist;
UIView *bgview;
UILabel *label;
int FAC;
int space;
int width;
int Index;
}
@end
@implementation Viewcontroller
-(void) Viewdidload {
[superviewdidload];
[selfinitdata];
< Span style= "Background-color:rgb (0,0,0)" > [ self creatview: FAC ];
< Span style= "Background-color:rgb (0,0,0)" > [ Nstimer scheduledtimerwithtimeinterval: 2 target: self selector: @selector (Creatviewandbutton) userinfo: nil Repeats : yes ];
}
-(void) InitData
{
FAC =2;
space =ten;
colrlist = @[ [ uicolor Redcolor],[ uicolor whitecolor],[ uicolor yellowcolor],[ uicolor greencolor],[ Uicolor browncolor],[ Uicolor purplecolor],[ Uicolor bluecolor] ]
}
-(void) Creatview: (int) number
{
< Span style= "Background-color:rgb (0,0,0)" >// Create parent view
bgview = [[ uiview alloc ] initwithframe: Cgrectmake ( 0 120 , cgrectgetwidth ( self . View Frame cgrectgetheight ( self View Frame
bgview. BackgroundColor = [uicolorblackcolor];
bgview. Layer. Cornerradius =;
< Span style= "Background-color:rgb (0,0,0)" > [ self View addsubview: bgview ];
label = [[UILabelalloc]initwithframe:cgrectmake( 0 , the , 375 , + )];
label . text =@"
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
iOS Find color block game