了解 animateWithDuration方法 制作动画变得不值钱 代码创建一个UIImageView 后加入self.view 容器中 调用点击屏幕touchesBegan 方法执行动画 #import "ViewController.h" @interface ViewController ( ...
分类:
其他好文 时间:
2016-06-05 19:59:49
阅读次数:
139
1.在UIView/.h文件中声明属性 2.在UIView/.m文件中重写init方法布局UIConllectionView 3.布局UICollectionReusableView 3.1.h文件 3.2.m文件 4.在ViewController中实现以下方法 ...
分类:
其他好文 时间:
2016-06-04 20:46:57
阅读次数:
146
当在一个viewController中添加了scrollView或者tableView的时候,贴边侧滑返回的时候会首先触发滚动而失效,要解决这个问题,需要通过requireGestureRecognizerToFail()方法来解决,代码如下: 使用方法:在viewDidAppear里边添加此段代码 ...
分类:
其他好文 时间:
2016-06-04 12:07:25
阅读次数:
130
#import "ViewController.h" #import <MessageUI/MessageUI.h> @interface ViewController ()<MFMessageComposeViewControllerDelegate> @end @implementation V ...
分类:
其他好文 时间:
2016-06-03 12:35:33
阅读次数:
160
一,效果图。 二,工程图。 三,代码。 ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end ViewController.m #import "ViewControlle ...
分类:
其他好文 时间:
2016-06-03 10:01:38
阅读次数:
219
从实践谈iOS生命周期 个人感觉生命周期无论在Android,还是iOS都是很重要的概念,因为在每个声明周期的状态下我们可以做很多预加载或者处理的操作。因此在这里主要总结下ViewController和AppDelegate中的一些状态。 应用程序的状态 看下这个图: Foreground :前台 ...
分类:
移动开发 时间:
2016-06-02 11:26:12
阅读次数:
250
demo下载地址:https://github.com/haozheMa/LoopProgressDemo/tree/master ViewController中的代码 ProgressView中的代码 ...
分类:
移动开发 时间:
2016-06-02 11:16:05
阅读次数:
184
利用UICollectionView 实现轮播图 :
具体代码如下, 简单粗暴, :
//
// ViewController.m
// CollectionPhotosView
//
// Created by 帝炎魔 on 16/5/30.
// Copyright © 2016年 帝炎魔. All rights reserved.
//
/**
* UICo...
分类:
移动开发 时间:
2016-06-01 10:25:34
阅读次数:
426
利用UIScrollView实现轮播图 , 需要三个ImageView轮流切换,具体原理就不讲解了.
具体实现代码如下:
//
// ViewController.m
// PhotosShowDemo
//
// Created by 帝炎魔 on 16/5/29.
// Copyright © 2016年 帝炎魔. All rights reserv...
分类:
移动开发 时间:
2016-06-01 10:24:36
阅读次数:
242
地图篇-05.导航 上一节讲了大头针的一些知识,这节来讲讲导航,这个非常简单 步骤: 1.获取用户输入的地址 2.创建目的地在地图上的点 3.创建当前位置在地图上的点 4.调用系统自带的地图App导航 代码前准备: 拖入上图中三个控件,并且脱线到ViewController.m中 然后上代码: 在上 ...
分类:
其他好文 时间:
2016-06-01 00:09:13
阅读次数:
177