UI复习笔记1

UIStepper

初始化控件

?


1

UIStepper * step = [[UIStepper alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];

设置控制器值是否连续触发变化

@property(nonatomic,getter=isContinuous) BOOL continuous;

若设置为YES,则长按会连续触发变化,若设置为NO,只有在按击结束后,才会触发。

设置长按是否一直触发变化

@property(nonatomic) BOOL autorepeat;

若设置为YES,则长按值会一直改变,若设置为NO,则一次点击只会改变一次值

设置控制器的值是否循环(到达边界后,重头开始,默认为NO)

@property(nonatomic) BOOL wraps;

设置控制器的值

@property(nonatomic) double value;

设置控制器的最大值和最小值

@property(nonatomic) double minimumValue;//默认为0

@property(nonatomic) double maximumValue; //默认为100

设置控制器的步长

@property(nonatomic) double stepValue;

设置控制器风格颜色

@property(nonatomic,retain) UIColor *tintColor;

设置控制器背景图片

- (void)setBackgroundImage:(UIImage*)image forState:(UIControlState)state;

获取背景图片

- (UIImage*)backgroundImageForState:(UIControlState)state;

通过左右按钮的状态设置分割线的图片

- (void)setDividerImage:(UIImage*)image forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState;

获取分割线图片

- (UIImage*)dividerImageForLeftSegmentState:(UIControlState)state rightSegmentState:(UIControlState)state;

设置和获取加号按钮的图片

- (void)setIncrementImage:(UIImage *)image forState:(UIControlState)state;

- (UIImage *)incrementImageForState:(UIControlState)state;

设置和获取减号按钮的图片

- (void)setDecrementImage:(UIImage *)image forState:(UIControlState)state;

- (UIImage *)decrementImageForState:(UIControlState)state;

UISwitch

一、第一种创建UISwitch控件的方法,在代码中动态创建。

1、打开Xcode  4.3.2, 新建项目Switch,选择Single View Application。

2、打开ViewController.m文件在viewDidLoad方法里添加代码:

[cpp] view plain copy

  1. - (void)viewDidLoad
  2. {
  3. [super viewDidLoad];
  4. UISwitch *switchButton = [[UISwitch alloc] initWithFrame:CGRectMake(50, 100, 20, 10)];
  5. [switchButton setOn:YES];
  6. [switchButton addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventValueChanged];
  7. [self.view addSubview:switchButton];
  8. // Do any additional setup after loading the view, typically from a nib.
  9. }

[switchButton addTarget:selfaction:@selector(switchAction:)forControlEvents:UIControlEventValueChanged];

代码中selector中的switchAction:需要我们自己实现,就是按下时接收到的事件。

记得把switchButton加到当前view,调用[self.viewaddSubview:switchButton];

3、监听UISwitch按下事件

实现代码如下:

[cpp] view plain copy

  1. -(void)switchAction:(id)sender
  2. {
  3. UISwitch *switchButton = (UISwitch*)sender;
  4. BOOL isButtonOn = [switchButton isOn];
  5. if (isButtonOn) {
  6. showSwitchValue.text = @"是";
  7. }else {
  8. showSwitchValue.text = @"否";
  9. }
  10. }

DAY-1 UIView

Projecte 1

- (void)viewDidLoad {
    [super viewDidLoad];

self.aView=[[UIView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];
    self.aView.backgroundColor=[UIColor redColor];
   
    self.bView=[[UIView alloc] initWithFrame:CGRectMake(150, 150, 200, 200)];
    self.bView.backgroundColor=[UIColor greenColor];
   
    self.cView=[[UIView alloc] initWithFrame:CGRectMake(200, 200, 200, 200)];
    self.cView.backgroundColor=[UIColor blueColor];
    //添加子视图
    [self.view addSubview:self.aView];
    [self.view addSubview:self.bView];
    [self.view addSubview:self.cView];
//    插入指定视图 在XXX的下面
    //[self.view insertSubview:self.bView belowSubview:self.aView];
//    在XXX上面
   // [self.view insertSubview:self.bView aboveSubview:self.aView];
//    在指定位置插入子视图
    //[self.view insertSubview:self.bView atIndex:0];
//    在父视图中移除子视图
   // [self.bView removeFromSuperview];
   
//    交换子视图的索引位置
    //[self.view exchangeSubviewAtIndex:2 withSubviewAtIndex:3];
    //将子视图放到最后
    [self.view sendSubviewToBack:self.cView];
//    将子视图放到最前
    [self.view bringSubviewToFront:self.aView];

}

//1.初始化视图
    self.myView=[[UIView alloc] initWithFrame:CGRectMake(100, 50, 100, 100)];
//    2.背景色
    self.myView.backgroundColor=[UIColor redColor];
//    3.添加子视图到view上
    [self.view addSubview:self.myView];
   
    self.view.backgroundColor=[UIColor purpleColor];
   
    CGRect rectView= self.view.frame;
   
    NSLog(@"%@",NSStringFromCGRect(rectView));
    //frame 相对父视图的坐标位置
    NSLog(@"myView.frame : %@",NSStringFromCGRect( self.myView.frame ));
//    bounds  只是显示当前视图的大小  和位置无关  (0,0)
    NSLog(@"myView.bounds:%@",NSStringFromCGRect(self.myView.bounds));
   
//    center 控件相对于父视图的中心点坐标
    NSLog(@"%@",NSStringFromCGPoint(self.myView.center));
//    设置视图的中心点坐标
    //self.myView.center=CGPointMake(300, 550);
//    改变视图的边界
   
    //self.myView.bounds=CGRectMake(0, 0, 50  , 50);
//    水平方向平移200点
//    self.myView.transform=CGAffineTransformMakeTranslation(200, 0);
     //self.myView.transform=CGAffineTransformMakeTranslation(0, 200);
    // self.myView.transform=CGAffineTransformMakeTranslation(200, 200);
   
    self.myView.transform=CGAffineTransformMakeRotation(3.14/4);

DAY1  UIlabel

//1.UILable的大小自适应实例:
    UILabel *myLabel=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 2, 2)];//设定位置与大小
    [myLabel setFont:[UIFont fontWithName:@"Helvetica" size:20.0]];//格式
    [myLabel setNumberOfLines:0];//行数,只有设为0才可以自适应
    [myLabel setBackgroundColor:[UIColor clearColor]];//背景色
    myLabel.shadowColor = [UIColor darkGrayColor];//阴影颜色
    myLabel.shadowOffset = CGSizeMake(1.0,1.0);//阴影大小
   
    NSString *text = @"abcdefghigklmnopqrstuvwxyz";
    UIFont *font = [UIFont fontWithName:@"Helvetica" size:20.0];
    CGSize size = [text sizeWithFont:font constrainedToSize:CGSizeMake(175.0f, 2000.0f) lineBreakMode:UILineBreakModeWordWrap];
    CGRect rect=myLabel.frame;
    rect.size=size;
    [myLabel setFrame:rect];
    [myLabel setText:text];
     myLabel.shadowColor = [UIColor darkGrayColor];//阴影颜色
     myLabel.shadowOffset = CGSizeMake(2.0,2.0);//阴影大小
    [self.view addSubview:myLabel];
    [myLabel release];
    //2.UILable的基本用法获取自馒头MAN百度空间,感谢馒头MAN
            //空间地址:http://hi.baidu.com/bunsman/blog/item/95777b0ebacf05fe36d122e2.html
    UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 40.0, 200.0, 30.0)];     
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 80.0, 200.0, 50.0)];     
    UILabel *label3 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 140.0, 200.0, 50.0)];     
    UILabel *label4 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 200.0, 200.0, 50.0)];     
    UILabel *label5 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 260.0, 200.0, 50.0)];     
    UILabel *label6 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 320.0, 200.0, 50.0)];     
    UILabel *label7 = [[UILabel alloc]initWithFrame:CGRectMake(50.0, 380.0, 200.0, 50.0)];     
   
    //设置显示文字     
    label1.text = @"label1";     
    label2.text = @"label2";     
    label3.text = @"label3--label3--label3--label3--label3--label3--label3--label3--label3--label3--label3--11个";     
    label4.text = @"label4--label4--label4--label4--4个";     
    label5.text = @"label5--label5--label5--label5--label5--label5--6个";     
    label6.text = @"label6";     
    label7.text = @"label7";     
   
    //设置字体:粗体,正常的是 SystemFontOfSize     
    label1.font = [UIFont boldSystemFontOfSize:20];     
   
    //设置文字颜色 
    label1.textColor = [UIColor orangeColor];     
    label2.textColor = [UIColor purpleColor];     
    //设置背景颜色 
    label1.backgroundColor = [UIColor clearColor];
    label2.backgroundColor = [UIColor  colorWithRed:0.5f green:30/255.0f blue:0.3f alpha:0.5f];
    //设置文字位置     
    label1.textAlignment = UITextAlignmentRight;     
    label2.textAlignment = UITextAlignmentCenter;     
    //设置字体大小适应label宽度     
    label4.adjustsFontSizeToFitWidth = YES;
    //设置label的行数     
    label5.numberOfLines = 2;     
   
    //设置高亮     
    label6.highlighted = YES;     
    label6.highlightedTextColor = [UIColor orangeColor];     
   
    //设置阴影     
    label7.shadowColor = [UIColor redColor];     
    label7.shadowOffset = CGSizeMake(1.0,1.0);     
   
    //设置是否能与用户进行交互     
   
    label7.userInteractionEnabled = YES;     
   
    //设置label中的文字是否可变,默认值是YES     
    label3.enabled = NO;     
   
    //设置文字过长时的显示格式     
   
    label3.lineBreakMode = UILineBreakModeMiddleTruncation;//截去中间     
    //  typedef enum {     
    //      UILineBreakModeWordWrap = 0,     
    //      UILineBreakModeCharacterWrap,     
    //      UILineBreakModeClip,//截去多余部分     
    //      UILineBreakModeHeadTruncation,//截去头部     
    //      UILineBreakModeTailTruncation,//截去尾部     
    //      UILineBreakModeMiddleTruncation,//截去中间     
    //  } UILineBreakMode;     
   
    //如果adjustsFontSizeToFitWidth属性设置为YES,这个属性就来控制文本基线的行为     
    label4.baselineAdjustment = UIBaselineAdjustmentNone;     
    //  typedef enum {     
    //      UIBaselineAdjustmentAlignBaselines,     
    //      UIBaselineAdjustmentAlignCenters,     
    //      UIBaselineAdjustmentNone,     
    //  } UIBaselineAdjustment;

添加到视图

self.lblName=[[UILabel alloc] initWithFrame:CGRectMake(100, 50, 150, 400)];
    self.lblName.backgroundColor=[UIColor redColor];
//    文本
    [email protected]"姓名";
//    文本颜色
    self.lblName.textColor=[UIColor greenColor];
//    文本对齐方式
    self.lblName.textAlignment=NSTextAlignmentCenter;
//    文本字体
    self.lblName.font=[UIFont systemFontOfSize:32 weight:5];
//    显示行数
    self.lblName.numberOfLines=10;

[self.view addSubview:self.lblName];

DAY-2 UITextField

self.txtName=[[UITextField alloc] initWithFrame:CGRectMake(100, 100, 200, 40)];
    [email protected]"guiyang";
    self.txtName.textColor=[UIColor blueColor];
//    边框样式 
    self.txtName.borderStyle=1;
    self.txtName.textAlignment=NSTextAlignmentCenter;
    [self.view addSubview:self.txtName];
   
   
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
   // NSLog(@"touch begin");
    [self hideKeyBoard];
}
/**
 *  隐藏键盘的方法
 */
-(void)hideKeyBoard
{
//    判断是否是第一响应者
    if ([self.txtName isFirstResponder]) {
//        失去第一响应者
        [self.txtName resignFirstResponder];
    }

}

UItextField通常用于外部数据输入,以实现人机交互。下面以一个简单的登陆界面来讲解UItextField的详细使用。

//用来显示“用户名”的label

UILabel* label1 = [[UILabelalloc] initWithFrame:CGRectMake(15, 65, 70, 30)];

label1.backgroundColor = [UIColorclearColor];

label1.font = [UIFontfontWithName:@"Helvetica-Bold"size:18];

label1.text = @"用户名";

label1.textColor = [UIColorwhiteColor];

[view1 addSubview:label1];

[label1 release];

UITextField * accountField = [[UITextField alloc] initWithFrame:CGRectMake(85.0f, 60.0f, 190.0f, 40.0f)];

[accountField setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型

accountField.placeholder = @"用户名"; //默认显示的字

accountField.secureTextEntry = NO; //是否以密码形式显示

accountField.autocorrectionType = UITextAutocorrectionTypeNo;//设置是否启动自动提醒更正功能

accountField.autocapitalizationType = UITextAutocapitalizationTypeNone;

accountField.returnKeyType = UIReturnKeyDone;  //键盘返回类型

accountField.clearButtonMode = UITextFieldViewModeWhileEditing; //编辑时会出现个修改X

accountField.delegate = self;

accountField.keyboardType = UIKeyboardTypeDefault;//键盘显示类型

accountField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; //设置居中输入

accountField.scrollEnabled = YES;//是否可以拖动

accountField.autoresizingMask = UIViewAutoresizingFlexibleHeight;//自适应高度

//用来显示“密码”的label

UILabel* label2 = [[UILabelalloc] initWithFrame:CGRectMake(15, 120, 70, 30)];

label2.backgroundColor = [UIColorclearColor];

label2.font = [UIFontfontWithName:@"Helvetica-Bold"size:18];

label2.text = @"密码";

label2.textColor = [UIColorwhiteColor];

[view1 addSubview:label2];

[label2 release];

UITextField*  passwdField = [[UITextField alloc] initWithFrame:CGRectMake(85.0f, 115.0f, 190.0f, 40.0f)];

[passwdFieldsetBorderStyle:UITextBorderStyleRoundedRect]; //外框类型

//passwdField.placeholder = @"密码"; //默认显示的字

passwdField.secureTextEntry = YES; //密码类型

passwdField.autocorrectionType = UITextAutocorrectionTypeNo;

passwdField.autocapitalizationType = UITextAutocapitalizationTypeNone;

passwdField.returnKeyType = UIReturnKeyDone;

passwdField.clearButtonMode = UITextFieldViewModeWhileEditing; //编辑时会出现个修改X

passwdField.delegate = self;

// passwdField.keyboardAppearance = UIKeyboardAppearanceDefault;

passwdField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;

passwdField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

委托方法

-(void)textFieldDidBeginEditing:(UITextField *)textField;

//当开始点击textField会调用的方法

-(void)textFieldDidEndEditing:(UITextField *)textField;

//当textField编辑结束时调用的方法

//按下Done按钮的调用方法,我们让键盘消失

-(BOOL)textFieldShouldReturn:(UITextField *)textField{

self.btn=[UIButton buttonWithType:UIButtonTypeRoundedRect];
    [self.btn setTitle:@"test" forState:UIControlStateNormal];
    self.btn.frame=CGRectMake(100, 100, 150, 44);
    [self.btn addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.btn];
}

-(void)test
{
    UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"系统提示" message:@"你真的要用2G3G4G流量聊天吗?" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
   
   
    alert.alertViewStyle=UIAlertViewStyleLoginAndPasswordInput;
    [alert show];
}

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex==0) {
        NSLog(@"cancel");
    }
    else if (buttonIndex==1)
    {
       
      UITextField *txtName=  [alertView textFieldAtIndex:0];
        NSLog(@"%@",txtName.text);

}

DAY-5

ScrollView

#define HEIGHT self.view.frame.size.height
#define WIDTH  self.view.frame.size.width
@interface ViewController : UIViewController<UIScrollViewDelegate>

@property(strong,nonatomic) UIScrollView *myScrollView;

@property(strong,nonatomic) UIPageControl *mypageControl;

@end

- (void)viewDidLoad {

[super viewDidLoad];
 
//    设置控件大小
    self.myScrollView=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    self.myScrollView.backgroundColor=[UIColor grayColor];
    // 内容面板大小
    self.myScrollView.contentSize=CGSizeMake(WIDTH*3, HEIGHT);
   
    //指定代理
   
    self.myScrollView.delegate=self;
    UIImageView *imgView1=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH , HEIGHT)];
    imgView1.image=[UIImage imageNamed:@"IMG_3824"];
   
   
    UIImageView *imgView2=[[UIImageView alloc] initWithFrame:CGRectMake(WIDTH, 0, WIDTH , HEIGHT)];
    imgView2.image=[UIImage imageNamed:@"IMG_3825"];
   
    UIImageView *imgView3=[[UIImageView alloc] initWithFrame:CGRectMake(WIDTH*2, 0, WIDTH , HEIGHT)];
    imgView3.image=[UIImage imageNamed:@"IMG_3826"];
   
    [self.myScrollView addSubview:imgView1];
    [self.myScrollView addSubview:imgView2];
    [self.myScrollView addSubview:imgView3];
    //锁定滚动方向
    self.myScrollView.directionalLockEnabled=YES;
//    设置分页
    self.myScrollView.pagingEnabled=YES;
//    隐藏滚动条
    self.myScrollView.showsHorizontalScrollIndicator=NO;
    [self.view addSubview:self.myScrollView];
   
   
    self.mypageControl=[[UIPageControl alloc] init];
   
    CGSize pageSize=CGSizeMake(120, 44);
   
    self.mypageControl.frame=CGRectMake((WIDTH-pageSize.width)/2, HEIGHT-pageSize.height-40, pageSize.width, pageSize.height);
   
    self.mypageControl.backgroundColor=[UIColor clearColor];
   
    self.mypageControl.numberOfPages=3;
    self.mypageControl.currentPage=0;
   
    [self.view addSubview:self.mypageControl];
   
   
}

-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
   
    self.mypageControl.currentPage=(int)(scrollView.contentOffset.x/WIDTH);
    //NSLog(@"%f",scrollView.contentOffset.x/WIDTH);

}

PickerView  还要练习

@interface ViewController : UIViewController<UIPickerViewDelegate,UIPickerViewDataSource>

@property(strong,nonatomic) UIPickerView *myPickerView;

@property(strong,nonatomic) NSArray *arr;

- (void)viewDidLoad {
    [super viewDidLoad];

[email protected][@"aa",@"bb",@"cc",@"dd",@"ee"];
   
    self.myPickerView=[[UIPickerView alloc] initWithFrame:CGRectMake(100, 200, 200, 100)];
    self.myPickerView.backgroundColor=[UIColor redColor];
   
    self.myPickerView.delegate=self;
    self.myPickerView.dataSource=self;
   
    [self.view addSubview:self.myPickerView];
   
   
   
}
#pragma mark 数据源  numberOfComponentsInPickerView
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
    return 1;
}

#pragma mark 数据源 Method pickerView:numberOfRows:
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
    return self.arr.count;
}
#pragma mark delegate 显示信息方法

-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
   return  self.arr[row];
}
#pragma mark 选中行的信息
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
    NSLog(@"%@",self.arr[row]);
}

-(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component
{
    return 100.0;

}

DAY-6 6-1 -6- 2练习

页面切换   (模态视图页面切换方式)6-1

1.NavigationController切换UIViewController的两种方式

方法一右侧进入

1 SecondViewController* svc=[[SecondViewController alloc]init];
2 [self.navigationController pushViewController:fvc animated:YES];

返回到上一个

[self.navigationController popViewControllerAnimated:YES];

另一种方法从下面切入

SecondViewController* svc=[[SecondViewController alloc]init];

[self.navigationController presentModalViewController:svc animated:YES];

[svc release];

返回到上一个UIViewController

[self.navigationController dismissModalViewControllerAnimated:YES];

2.如果没有导航栏NavigationController的话 也是可以切换的

SecondViewController* svc=[[SecondViewController alloc]init];

[self presentModalViewController:svc animated:YES];

[svc release];

返回到上一个UIViewController

[self dismissModalViewControllerAnimated:YES];

DAY-7 传值

时间: 2024-08-15 23:03:13

UI复习笔记1的相关文章

安卓开发复习笔记——Fragment+ViewPager组件(高仿微信界面)

什么是ViewPager? 关于ViewPager的介绍和使用,在之前我写过一篇相关的文章<安卓开发复习笔记——ViewPager组件(仿微信引导界面)>,不清楚的朋友可以看看,这里就不再重复. 什么是Fragment? Fragment是Android3.0后新增的概念,Fragment名为碎片,不过却和Activity十分相似,具有自己的生命周期,它是用来描述一些行为或一部分用户界面在一个Activity中,我们可以合并多个Fragment在一个单独的activity中建立多个UI面板,或

[Java基础] Java线程复习笔记

先说说线程和进程,现代操作系统几乎无一例外地采用进程的概念,进程之间基本上可以认为是相互独立的,共享的资源非常少.线程可以认为是轻量级的进 程,充分地利用线程可以使得同一个进程中执行多种任务.Java是第一个在语言层面就支持线程操作的主流编程语言.和进程类似,线程也是各自独立的,有自 己的栈,自己的局部变量,自己的程序执行并行路径,但线程的独立性又没有进程那么强,它们共享内存,文件资源,以及其他进程层面的状态等.同一个进程内的 多个线程共享同样的内存空间,这也就意味着这些线程可以访问同样的变量和

安卓开发复习笔记——Fragment+FragmentTabHost组件(实现新浪微博底部菜单)

记得之前写过2篇关于底部菜单的实现,由于使用的是过时的TabHost类,虽然一样可以实现我们想要的效果,但作为学习,还是需要来了解下这个新引入类FragmentTabHost 之前2篇文章的链接: 安卓开发复习笔记——TabHost组件(一)(实现底部菜单导航) 安卓开发复习笔记——TabHost组件(二)(实现底部菜单导航) 关于Fragment类在之前的安卓开发复习笔记——Fragment+ViewPager组件(高仿微信界面)也介绍过,这里就不再重复阐述了. 国际惯例,先来张效果图: 下面

计算机图形学 复习笔记

计算机图形学 复习笔记 (个人整理,仅做复习用 :D,转载注明出处:http://blog.csdn.net/hcbbt/article/details/42779341) 第一章 计算机图形学综述 研究内容 图形的概念:计算机图形学的研究对象 能在人的视觉系统中产生视觉印象的客观对象 包括自然景物.拍摄到的图片.用数学方法描述的图形等等 图形的要素 几何要素:刻画对象的轮廓.形状等 非几何要素:刻画对象的颜色.材质等 图形表示法 点阵表示 枚举出图形中所有的点,简称为图像. 参数表示 由图形的

安卓开发复习笔记——WebView组件

我们专业方向本是JAVA Web,这学期突然来了个手机App开发的课设,对于安卓这块,之前自学过一段时间,有些东西太久没用已经淡忘了 准备随笔记录些复习笔记,也当做温故知新吧~ 1.什么是WebView? WebView(网络视图)能加载显示网页,可以将其视为一个浏览器,它使用了WebKit渲染引擎加载显示网页. 废话不多说,直接上代码 1.需要在xml布局文件中声明WebView组件 1 <WebView 2 android:id="@+id/webview" 3 androi

UI学习笔记---第一天

一.iOS概述 iOS是Apple公司的移动操作系统,主要?用于iPhone.iPad.iPad Mini.iPod Touch等移动产品. 借助iOS,我们可以开发视频类.美图类.新闻类.?音乐类.团购类.电商类.阅读类.出?行类.?生活服务类.游戏类等应?用程序. 除此之外,iOS还可以与外部设备通信,开发出更多改变?活的产品,?比 如:智能家居(iOS App控制电视.空调等).健?产品(将人体健康 状况通过App直观的展现出来)等. 二.UI概述 UI(User Interface):?

jQuery Easy UI整理笔记目录

jQuery Easy UI整理笔记目录 ps:最近对Easy UI比较感兴趣,打算系统的学习一下,前面基础部分的东西很简单,都是参照API去写的,例子也就是随便举的,没有列举项目中的实际应用. 打算基础部分后面的知识多投入点时间,多与项目中的实际相结合一些,也尽量多想象出一些应用场景. 计划最慢每周更新一篇文章. 一.基础组件部分 1. jQuery Easy UI的使用 2. jQuery Easy UI Draggable(拖动)组件 3. jQuery Easy UI Droppable

UI学习笔记---第十四天数据持久化

一.沙盒机制 每个应用程序位于文件系统的严格限制部分 每个应用程序只能在为该程序创建的文件系统中读取文件 每个应用程序在iOS系统内斗放在了统一的文件夹目录下 沙盘路径的位置 1. 通过Finder查找程序沙盘相对路径 ~/Library/Application Support/iPhone Simulator 2. 通过代码查找程序沙盘相对路径 NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory,NSSearc

oracle从入门到精通复习笔记续集之PL/SQL(轻量版)

复习内容: PL/SQL的基本语法.记录类型.流程控制.游标的使用. 异常处理机制.存储函数/存储过程.触发器. 为方便大家跟着我的笔记练习,为此提供数据库表文件给大家下载:点我下载 为了要有输出的结果,在写PL/SQL程序前都在先运行这一句:set serveroutput on结构:declare--声明变量.类型.游标begin--程序的执行部分(类似于java里的main()方法)exception--针对begin块中出现的异常,提供处理的机制--when...then...--whe