首页 编程 软件学院 查看内容

自定义TabBar,带记忆存储功能的计算器

2015-9-18 16:47 |原作者: zifeng1300 4601 0

摘要: 自定义TabBar,可以选中和非选中图片,还可以加badgeValue测试环境:Xcode 6.2,iOS 6.0 以上带记忆存储功能的计算器(作者:shift_sheep)一个带记忆存储功能的基础计算器,可以查看最近的计算历史纪录。小弟学生党一 ...
关键词: nbsp UIViewController 以上 环境 测试 Xcode HyTransitions 动画 作者 self

自定义TabBar,可以选中和非选中图片,还可以加badgeValue

测试环境:Xcode 6.2,iOS 6.0 以上

带记忆存储功能的计算器 (作者: shift_sheep )

一个带记忆存储功能的基础计算器,可以查看最近的计算历史纪录。

小弟学生党一枚,出于兴趣自学iOS一段时间了,所以做了这个小app练练手,也问过大家不少很新手的问题,很感谢。希望大家多多关照!

测试环境:Xcode 6.2,iOS 6.0 以上

解析XML的地址选择 (作者: dycdante )

通过解析xml文件得到地址数据然后用pickerview 显示出来

测试环境:Xcode 6.2,iOS 6.0 以上

UIScrollView和自定义PageControl的结合使用 (作者: nostyle )

1,UIScrollView页码控制,page点灵活的自定义,page点动画过度,page风格可随你设置的UI图片而变化。

2,欢迎fork!

测试环境:Xcode 6.2,iOS 6.0 以上

HySubmitTransitionObjective-C转场动画OC版 (作者: wwdc14 )

1.原作者:@entotsu

1.1 原作者连接: https://github.com/entotsu/TKSubmitTransition [swift版]

1.2 objective-C版链接:https://github.com/wwdc14/HySubmitTransitionObjective-C [objective-C版]

2.使用:

import "HyTransitions.h" import "LoglnButton.h"

2.1 创建button

LoglnButton *log = [[LoglnButton alloc] initWithFrame:CGRectMake(20, CGRectGetHeight(self.view.bounds) - (40 80), [UIScreen mainScreen].bounds.size.width - 40, 40)];
[log setBackgroundColor:[UIColor colorWithRed:0 green:119/255.0f blue:204.0f/255.0f alpha:1]];
[self.view addSubview:log];
[log setTitle:@"登录" forState:UIControlStateNormal];
[log addTarget:self action:@selector(PresentViewController:) forControlEvents:UIControlEventTouchUpInside];

2.2 实现方法

//网络正常 或者是密码账号正确跳转动画
[button ExitAnimationCompletion:^{
  if (weak.Switch.on) {
    [weak didPresentControllerButtonTouch];
  }
}];
//网络错误 或者是密码不正确还原动画
[button ErrorRevertAnimationCompletion:^{
  if (weak.Switch.on) {
    [weak didPresentControllerButtonTouch];
  }
}];

2.3 创建控制器

    UIViewController *controller = [SecondViewController new];
    UINavigationController *nai = [[UINavigationController alloc] initWithRootViewController:controller];
    nai.transitioningDelegate = self;
    [self presentViewController:nai animated:YES completion:nil];

2.4 实现代理

- (id)animationControllerForPresentedController:(UIViewController *)presented
                                                                  presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
    return [[HyTransitions alloc]initWithTransitionDuration:0.4f StartingAlpha:0.5f isBOOL:true];
}
- (id )animationControllerForDismissedController:(UIViewController *)dismissed{
    return [[HyTransitions alloc]initWithTransitionDuration:0.4f StartingAlpha:0.8f isBOOL:false];
}

测试环境:Xcode 6.2,iOS 6.0 以上

本文出处: http://www.cocoachina.com/
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部