//// ViewViewController.swift// UIControlDemo//// Created by on 14/12/1.// Copyright (c) 2014年 马大哈. All rights reserved.//import UIKitclass ViewViewCo...
分类:
其他好文 时间:
2014-12-04 21:14:22
阅读次数:
180
UIControl-IOS开发UIKit提供了一组控件:UISwitch开关、UIButton按钮、UISegmentedControl分段控件、UISlider滑块、UITextField文本字段控件、UIPageControl分页控件。控件是对UIView派生类的实用增强及补充,并可以直接附着于...
分类:
移动开发 时间:
2014-12-04 19:55:14
阅读次数:
165
@interface UIView : UIResponder/*** 通过一个frame来初始化一个UI控件*/- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInteractio...
分类:
其他好文 时间:
2014-12-04 19:44:54
阅读次数:
147
UIView下使用Animation控制动画动画效果是IOS界面重要的特色之一,其中CAAnimation是所有动画对象的抽象父类,作为新人,使用较多的是UIView下的动画方法(类方法)。使用UIView下的动画,有下面几个方法。方法一:设置beginAnimations其中memberView为...
分类:
其他好文 时间:
2014-12-03 23:12:31
阅读次数:
205
抽屉效果功能实现
一、.h文件
@interfaceHMDrawViewController:UIViewController@property(nonatomic,weak,readonly)UIView*mainView;@property(nonatomic,weak,readonly)UIView*leftView;@property(nonatomic,weak,readonly)UIView*rightView;@end
二、.m文件
@in..
分类:
移动开发 时间:
2014-12-03 02:00:45
阅读次数:
281
本文转载至http://www.cocoachina.com/ios/20141126/10320.htmliOS 8的新特性之一就是让接口更有适应性、更灵活,因此许多视图控制器的实现方式发生了巨大的变化。全新的UIPresentationController在实现视图控制器间的过渡动画效果和自适应...
分类:
移动开发 时间:
2014-12-03 00:18:07
阅读次数:
393
效果图:代码:- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. UIView *view=[[UIView alloc]initWithF...
分类:
其他好文 时间:
2014-12-02 17:02:58
阅读次数:
144
使用小图片当变长输入框或类似QQ聊天文字背景效果时,需要拉伸图片。UIImage提供了三个可完成此任务的方法:resizableImageWithCapInsets:resizableImageWithCapInsets:resizingMode:stretchableImageWithLeftCa...
分类:
移动开发 时间:
2014-12-02 00:02:30
阅读次数:
545
1.把一维下标变成二维下标,如下例中有16个元素,每行4个元素,则有for(int i=0;i<16; i++) { int row = i / 4;//得到行数 int column = i % 4 ;//得到列数 v = [[UIView allo...
分类:
编程语言 时间:
2014-11-29 18:49:59
阅读次数:
200
记笔记啦。。。。
----------------
-UIScrollView
普通的UIView不具备滚动功能,不能显示过多的内容。UIScrollView是一个能够滚动的视图控件,可以用来展示大量的内容,并且可以通过滚动查看所有的内容
UIScrollView的用法,将需要展示的内容添加到UIScrollView中
设置UIScrollView的contentVi...
分类:
其他好文 时间:
2014-11-29 14:39:34
阅读次数:
137