zoukankan      html  css  js  c++  java
  • iOS UIScrollView的简单使用


    本文代码下载

    http://vdisk.weibo.com/s/BDn59yfnBVMAJ  

    //
    //  ViewController.m
    //  ScrollView_T1119
    //
    //  Created by 杜 甲 on 13-4-8.
    //  Copyright (c) 2013年 杜 甲. All rights reserved.
    //
    
    #import "ViewController.h"
    
    @interface ViewController ()
    
    @end
    
    @implementation ViewController
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
    	// Do any additional setup after loading the view, typically from a nib.
        UIScrollView* scrollerView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320 , 548)];
        scrollerView.contentSize = CGSizeMake(800, 800);
        scrollerView.scrollEnabled = YES;
        scrollerView.delegate = self;
        scrollerView.bounces = NO;
        scrollerView.alwaysBounceHorizontal = YES;
        UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 800, 800)];
        [imageView setImage:[UIImage imageNamed:@"xiaonan.jpg"]];
        [scrollerView addSubview:imageView];
        [self.view addSubview:scrollerView];
        
     
    }
    
    - (void)didReceiveMemoryWarning
    {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
    }
    
    @end
    


  • 相关阅读:
    pip安装
    nfs
    源码方式安装软件
    自启动
    multipath
    linux永久添加和删除路由
    iscsi
    linux识别workstation磁盘的uuid
    centos镜像各种cd,dvd版本区别
    转:C# 中 MSCHART 饼状图显示百分比
  • 原文地址:https://www.cnblogs.com/dyllove98/p/3217844.html
Copyright © 2011-2022 走看看