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
iOS UIScrollView的简单使用的更多相关文章
- ios下最简单的正则,RegexKitLite
ios下最简单的正则,RegexKitLite 1.去RegexKitLite下载类库,解压出来会有一个例子包及2个文件,其实用到的就这2个文件,添加到工程中.备用地址:http://www.coco ...
- iOS中XMPP简单聊天实现 好友和聊天
版权声明本文由陈怀哲首发自简书:http://www.jianshu.com/users/9f2e536b78fd/latest_articles;微信公众号:陈怀哲(chenhuaizhe2016) ...
- IOS UIScrollView常用代理方法
iOS UIScrollView代理方法有很多,从头文件中找出来学习一下 //只要滚动了就会触发 - (void)scrollViewDidScroll:(UIScrollView *)scrollV ...
- iOS百度地图简单使用详解
iOS百度地图简单使用详解 百度地图 iOS SDK是一套基于iOS 5.0及以上版本设备的应用程序接口,不仅提供展示地图的基本接口,还提供POI检索.路径规划.地图标注.离线地图.定位.周边雷达等丰 ...
- iOS设计模式 - (3)简单工厂模式
iOS设计模式 - (3)简单工厂模式 by Colin丶 转载请注明出处: http://blog.csdn.net/hitwhylz/article/ ...
- iOS - UIScrollView
前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIScrollView : UIView <NSCoding> @available(iOS 2.0, ...
- iOS UIScrollView 你可能不知道的奇技淫巧
iOS 的 UIScrollView 可以说是十分强大,巧妙地运用它可以得到一些意想不到的效果.本文将举几个 ScrollView 不常见运用的例子. 自带信息应用 这个界面既可以上下卷动,也可以左右 ...
- IOS开发之简单音频播放器
今天第一次接触IOS开发的UI部分,之前学OC的时候一直在模拟的使用Target-Action回调模式,今天算是真正的用了一次.为了熟悉一下基本控件的使用方法,和UI部分的回调,下面开发了一个特别简易 ...
- iOS百度地图简单使用
本文介绍三种接口: 1.基础地图2.POI检索3.定位 首先是配置环境,有两种方法,方法在官方教程里都有,不再多说 1.使用CocoaPods自动配置[这个方法特别好,因为当你使用CocoaPods配 ...
随机推荐
- OCP-1Z0-051-题目解析-第6题
6. Examine the structure of the SHIPMENTS table: name Null Type PO_ID ...
- [Hapi.js] Serving static files
hapi does not support serving static files out of the box. Instead it relies on a module called Iner ...
- git错误:fatal: Not a git repository (or any of the parent directories): .git
git错误:fatal: Not a git repository (or any of the parent directories): .git 我用git add file添加文件时出现这样错误 ...
- [Python学习笔记][Python内置函数]
Python 常用内建函数 比较基础的列表 abs(x) 求绝对值 pow(x,y) 返回x的y次方,等同于x**y round(x[,小数位数]) 对x进行四舍五入,若不指定位数,则返回整数 chr ...
- JS正则表达式收集篇
1.验证只可输入整数或小数点后两位的数字:/^([1-9]{1}|[1-9]{1}[0-9])+(.[1-9]{1,2})?$/ 2.验证Email: /^([a-zA-Z0-9]+[_|\_|\.] ...
- 返回某个界面——nav
NSInteger index=[[self.navigationController viewControllers]indexOfObject:self]; [self.navigationC ...
- iOS指纹识别
#import "ViewController.h" #import <LocalAuthentication/LocalAuthentication.h> @inte ...
- 省市联动JQ封装比较简洁调用的方法
前言 因为省市联动的需求在每个项目几乎存在,所以本人也对此在web页面通过封装比较简洁的JQ方法循环判断调用调用后台获取数据再绑定到Select表单上.如果对代码有什么疑问或者更好办法可以在评论区留言 ...
- UVA 227 Puzzle - 输入输出
题目: acm.hust.edu.cn/vjudge/roblem/viewProblem.action?id=19191 这道题本身难度不大,但输入输出时需要特别小心,一不留神就会出问题. 对于输入 ...
- Niagara AX之BajaScript资料哪里找
四个步骤:(开篇:多谢陈工!) 1.Services下添加box->boxService: 2.在Apps下添加BajaScriptTutorialsApp: 3.登录用户的Web Profil ...