您的位置:首页 > 其它

源码推荐(9.18):自定义TabBar,带记忆存储功能的计算器

2015-09-18 09:04 573 查看
自定义TabBar(作者:zifeng1300)
自定义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 以上

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: