Giter Site home page Giter Site logo

lxalertview's Introduction

LXAlertView

自定义的AlertView

初始化方法.(init)

  • (id)initWithTitle:(NSString *)title Type:(LXAlertViewType)type

传值通过delegate (result)

  • (void)lxAlertView:(LXAlertView *)alertView withButtonIndex:(NSInteger)buttonIndex withObject:(NSString *)object //buttonIndex 1为确定 2为取消 object为textField.text的值.

show方法. (show)

  • (void)show

动画开始. (startAnimation)

  • (void)setStartState {

self.transform = CGAffineTransformMakeScale(0.01, 0.01);

}

动画结束.(endAnimation)

  • (void)setEndState {

self.transform = CGAffineTransformMakeScale(1.0, 1.0);

}

原理:show时将会先调用动画开始方法, 在self即将添加到父视图时将会触发下面这个方法,进行蒙层的添加和动画结束的操作

  • (void)willMoveToSuperview:(UIView *)newSuperview

源码不到200行, 这里只展示了四种样式, 可根据具体需求重构UI和动效.从设计上还有一些不足,如果问题issue我或者将问题发到我的邮箱[email protected], 谢谢.

image

lxalertview's People

Contributors

liuxu0718 avatar

Stargazers

Евгений (Yevhen) avatar  avatar 熔点 avatar  avatar enzeChen avatar wulinhong avatar roctii avatar iAppleBoy avatar  avatar  avatar  avatar Amon avatar Jobin Kurian avatar  avatar Du Zixi avatar  avatar  avatar  avatar Ldmnice avatar Liu Chuanrui avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.