<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

        DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css

        來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-27 16:36:26
        文檔

        DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css

        DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css_WEB-ITnose: IBAnimatable Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable. The app was made in Interface Builder with IBAnimatable without a single line of c
        推薦度:
        導(dǎo)讀DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css_WEB-ITnose: IBAnimatable Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable. The app was made in Interface Builder with IBAnimatable without a single line of c

        IBAnimatable

        Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.

        The app was made in Interface Builder with IBAnimatable without a single line of code . Due to the size of the GIF file on Dribbble , it only demonstrates a subset of features. We can also find the full HD version on YouTube orMP4 on Github

        Here is the design in Interface Builder (Storyboard).

        With IBAnimatable , we can design a UI in an Interface Builder like Sketch, and prototype animations in a Swift playground like Framer Studio. Also we can use the output of the design directly in the production ready App.

        As a designer, we love Sketch, which is a simple but yet super powerful tool to design UI. However, Sketch can't design interaction, navigation, transition and animation, we may need another tool like Framer Studio to design some of them. Moreover, to make an App Store ready App, we need to use Xcode and Interface Builder to implement the UI and animations. To speed up the process and minimise the waste, we create IBAnimatable to make Interface Builder designable and animatable.

        Languages

        中文

        Features

      1. From prototype to shippable App Store ready App - What you design in Interface Builder is what the App exactly looks like.
      2. Designer friendly - Sketch style setting panel on Attributes Inspector to lower the learning curve for using Interface Builder.
      3. Animation desigin support in Swift playground - Similar to Framer Studio, we can prototype animations in Swift playground to save time for runing on simulator or actual iOS devices.
      4. Built-in Auto Layout support - We can use Auto Layout and Size Classes with IBAnimatable to support orientations and multiple iOS devices.
      5. Navigation and transition support - We can use default navigation pattern in the App and IBAnimatable also adds unwind segues to navigate back or dismiss scene without any code. More transitions will be added soon.
      6. Protocol oriented programming - IBAnimatable uses a protocol oriented programming paradigm. With Swift protocol extension, it is easy to support more designable or animatable features. We can even use these protocol extensions to create other custom UI elements instead of using the default ones from IBAnimatable .
      7. Use cases

      8. Prototyping - Create interactive proptotypes to validate ideas quickly.
      9. Redesigning in Interface Builder - Redesign UI from Sketch and animation from Framer Studio without writing any code.
      10. Making custom UI elements - Use IBAnimatable protocols to make custom UI elements. e.g. Buttons with a default color palette.
      11. How to run the example App

        The easy way to learn and understand how powerful of IBAnimatable is to run the example App and play around the settings in Interface Builder. Just few steps we can run the App as below:

        1) Clone the repository

        $ git clone https://github.com/JakeLin/IBAnimatable.git

        2) Open the workspace in Xcode

        $ cd IBAnimatable$ open "IBAnimatable.xcworkspace"

        3) Compile and run the app in your simulator or iOS device

        How to design in Interface Builder

        To use IBAnimatable to design the UI and animations in Interface Builder, just follow few steps as below:

      12. Open a storyboard or Xib file.
      13. Drag and drop a UIKit element eg. UIView to a ViewController.
      14. In Identity Inspector, connect the UI element to Animatable custom UI class eg. AnimatableView , you can find all Animatable classes inAPIs section.
      15. Configure the UI and animations in Attribute Inspector.
      16. How to animate in Swift playground

        We can configure the animation settings in Attribute Inspector. However, Interface Builder doesn't support previewing Animations, but we can still prototype animations in Swift playgournd. There are three sample pages to demostrate how to design animation in Swift playground. You can find them in IBAnimatable.playground . Firstly, select one page in Swift playground, then click on "Assistant editor" button to split the playground. After that, select "Timeline" on the top of right-hand side to preview the animation. We can use Xcode menu "Editor" -> "Execute" to re-run the playground.

        How to animate programmatically

        As you saw above, we can prototype an App fully in Interface Builder withouth single line of code, but IBAnimatable also provides APIs to let us fully control the UI and animations. IBAnimatable provides simple APIs like pop() . We can simplly call them in one line.

        view.pop() // pop animation for the viewview.squeezeFadeInLeft() // squeeze and fade in from left animation

        You can play around with all these predefined animations in the Swift playground Page - Predefined Animations

        Animation properties

        There are some properties we can change to customise the animation. What we need to do is to set the properties and call animate() method to start the animation.

        // Setup the animationview.animationType = "SqueezeInLeft"view.delay = 0.5view.damping = 0.5view.velocity = 2view.force = 1// Start the animationview.animate()

        You can play around with all animations with different properties in the Swift playground Page - Animation Properties

        Chaining animations

        Sometimes, we need to run another animation after the previous one. With IBAnimatble , we can easily chain animations together to provide a sleek user experience.

        // Simplly put the next animation within `{}` closure as below. It is an example to pop the view after squeeze in from the top.view.squeezeInDown{ view.pop() }// Heaps of animations have been chained togehter, it is the source code of animated Gif in "Animate in Swift playground" sectionview.squeezeInDown{ view.pop { view.shake{ view.squeeze{ view.wobble{ view.flipX { view.flash{ view.flipY { view.fadeOutDown() } } } } } } } }

        How to install

        Manually install

        Copy and paste IBAnimatable folder in your Xcode project.

        Git submodule

        TBD, more details on Issue #22 - Swift package manager support

        Swift package manager

        TBD, more details on Issue #5 - Swift package manager support

        CocoaPods

        TBD, more details on Issue #7 - CocoaPods support

        Carthage

        TBD, more details on Issue #6 - Carthage support

        APIs

        Animatable UI elements

        The easiest way to use IBAnimatable is to drag and drop UIKit elements and connect with Animatable UI elements in Identity Inspector. Here are the supported Animatable UI elements to map UIKit elements.

        UIKit elements Animatable UI elements Remark
        UIView AnimatableView
        UIBarButtonItem AnimatableBarButtonItem
        UIButton AnimatableButton
        UIButton AnimatableCheckBox Connect UIButton as AnimatableCheckBox to make CheckBox control
        UIImageView AnimatableImageView
        UILabel AnimatableLabel To style the text in Label, we can use Interface Builder built-in Attributed Text
        UIStackView AnimatableStackView
        UITableView AnimatableTableView
        UITableViewCell AnimatableTableViewCell
        UITextField AnimatableTextField
        UITextView AnimatableTextView
        UIView DesignableGradientView
        UINavigationBar DesignableNavigationBar
        UIViewController DesignableViewController

        Designable protocols

        IBAnimatable provides a set of Designable protocols as below. Because of the power of protocol oriented programming in Swift, we don't even have to use Animatable default UI elements eg. AnimatableView to unlocked the power of IBAnimatable . We can conform to IBAnimatable protocols to use the default implementation in protocol extension to create other custom UI elements.

        BarButtonItemDesignable

        Property name Data type Remark
        roundedImage Optional By default, Interface Builder can only support outline images for Bar Button Item. With roundedImage , we can display a rounded image. The image can not be previewed in Interface Builder.

        BlurDesignable

        Property name Data type Remark
        blurEffectStyle Optional Support three different blur effects: ExtraLight , Light and Dark . They ard defined in BlurEffectStyle enum. The look of blur effect in Interface Builder is different from Simulator or device.
        blurOpacity CGFloat Opacity of the blur effect specified above. Default value is CGFloat.NaN , the value is from 0.0 to 1.0.

        BorderDesignable

        Property name Data type Remark
        borderColor Optional border color
        borderWidth CGFloat border width. Default value is CGFloat.NaN , the value is greater than 0.
        borderSide Optional border side, Top , Right , Bottom or Left . If not specify, then display four sides.

        CheckBoxDesignable

        Property name Data type Remark
        checked Bool Default value is false
        checkedImage Optional The image to display when CheckBox is checked.
        uncheckedImage Optional The image to display when CheckBox is unchecked.

        CornerDesignable

        Property name Data type Remark
        cornerRadius CGFloat rounded corner radius. Default value is CGFloat.NaN , the value is greater than 0.

        FillDesignable

        Property name Data type Remark
        fillColor Optional fill color of the UI Element
        opacity CGFloat opacity, alpha of the UI Element, Dafault value is CGFloat.NaN , the value is from 0.0 to 1.0.

        GradientDesignable

        Property name Data type Remark
        startColor Optional start gradient color
        endColor Optional end gradient color
        startPoint Optional start direction point, can find in GradientStartPoint .

        NavigationBarDesignable

        Property name Data type Remark
        solidColor Bool whether to display solid color only. Default value is false . Need to manually untick translucent in Interface Builder, otherwise, it will have constrait issue in IB although it is correct in run time.

        MaskDesignable

        Property name Data type Remark
        maskType Optional maks type, eg. Circle .

        PaddingDesignable

        It is used in AnimatableTextField to add padding on either or both sides.

        Property name Data type Remark
        paddingLeft CGFloat padding on left-hand side. Default value is CGFloat.NaN .
        paddingRight CGFloat padding on right-hand side. Default value is CGFloat.NaN .
        paddingSide CGFloat padding on both sides. Default value is CGFloat.NaN .

        PlaceholderDesignable

        Property name Data type Remark
        placeholderColor Optional placeholder text color in AnimatableTextField .

        RootWindowDesignable

        Property name Data type Remark
        rootWindowBackgroundColor Optional root window background color. Can be seen when we use flip transition.

        RotationDesignable

        Property name Data type Remark
        rotate CGFloat rotation of the UI element in degrees. Default value is CGFloat.NaN , value is from 0 to 360.

        ShadowDesignable

        Drop shadow of the UI element, it is popular in Material Design. These properties are not able to render in IB correctly, it maybe an Interface Builder's bug.

        Property name Data type Remark
        shadowColor Optional shadow color
        shadowRadius CGFloat shadow corner radius. Default value is CGFloat.NaN , the value is greater than 0.
        shadowOpacity CGFloat shadow opacity. Default value is CGFloat.NaN , the value is from 0.0 to 1.0.
        shadowOffset CGPoint x is horizontal offset and y is vertical offset.

        SideImageDesignable

        Display a side hint image in AnimatableTextField

        Property name Data type Remark
        leftImage Optional the image to display on the left-hand side.
        leftImageLeftPadding CGFloat left padding of hint image. Default value is CGFloat.NaN .
        leftImageRightPadding CGFloat right padding of hint image. Default value is CGFloat.NaN .
        leftImageTopPadding CGFloat top padding of hint image. Default value is CGFloat.NaN . If not specified, the image will center vertically.

        StatusBarDesignable

        Property name Data type Remark
        lightStatusBar Bool to display white or black text status bar. Default value is false to display black text.

        TableViewCellDesignable

        Property name Data type Remark
        removeSeparatorMargins Bool whether to remove separator margins in AnimatableTableViewCell . Default value is false . There maybe a bug of Interface Builder when setting "Separator Insert" to 0 doesn't work.

        TintDesignable

        Easily add color layer on top of the UI element especially AnimatableImageView .

        Property name Data type Remark
        tintOpacity CGFloat opacity of tint color (white color). Default value is CGFloat.NaN .
        shadeOpacity CGFloat opacity of shade color (black color). Default value is CGFloat.NaN .
        toneColor Optional tone color
        toneOpacity CGFloat opacity of tone color. Default value is CGFloat.NaN .

        ViewControllerDesignable

        Property name Data type Remark
        hideNavigationBar Bool whether to hide navigation bar. Default value is false .

        Animatable protocol

        Properties

        Property name Data type Remark
        animationType Optional Supported animations. All supported predefined animations are in enum AnimationType
        autoRun Bool Whether to automatically start the animation. Default value is true . if it is true, the animation will automatically run when the view is loaded. If want to manually start the animation should set it to false .
        duration CGFloat Animation duration in seconds. Default value is 0.7.
        delay Double Delay to start the animation in seconds. Default value is 0.
        damping CGFloat Used in UIView Spring animation (0 ~ 1 seconds). To smoothly decelerate the animation without oscillation, use a value of 1. Employ a damping ratio closer to zero to increase oscillation. Default value is 0.7. Notice: FadeOutIn, FadeInOut, Shake, Pop, Morph, Squeeze, Flash, Wobble and Swing animations do not use damping.
        velocity CGFloat used in UIView Spring animation. A value of 1 corresponds to the total animation distance traversed in one second. For example, if the total animation distance is 200 points and you want the start of the animation to match a view velocity of 100 pt/s, use a value of 0.5. Default is 0.7. Notice: FadeOutIn, FadeInOut, Shake, Pop, Morph, Squeeze, Flash, Wobble and Swing animations do not use damping.
        force CGFloat used to apply force to the animation. The number is higher, the animation property has more changes. eg. for Pop animation, higher force causes the view poping bigger. Default value is 1.
        repeatCount Float Used to sepecify the count to repeat the animation. Can noly used in Shake, Pop, Morph, Squeeze, Flash, Wobble and Swing animations. Default value is 1.

        Extension

        UIViewController

        With these methods, we can navigate back or dismiss current ViewController with any code in Interface Builder.

        Method name Remark
        func unwindToViewController(sender: UIStoryboardSegue) Used in Interface Builder to uswind from Naviagation Controller
        func dismissCurrentViewController(sender: UIStoryboardSegue) Used in Interface Builder to dismiss current ViewController

        How to contribute

        All of us can contribute to this project. Fewer overheads mean less time to build quality Apps and more time to enjoy coffee :coffee:? .

      17. If you are a designer, you can design in Interface Builder with IBAnimatable without designing tool like Sketch, or implement your existing design from Sketch or Photoshop in Interface Builder rapidly. With IBAnimatable , you should be able to do

        all most of design work in Interface Builder. If you have any feature request, please create a GitHub Issue and we will put it in the backlog. If you have done any design with IBAnimatable , please let us know via creating Pull Request or GitHub Issue. We will add it to Readme file.
      18. If you are a developer, you can work on features or fix bugs, please check outGitHub Issues to find out the backlog. If you have used IBAnimatable in your App, please let us know via creating Pull Request or GitHub Issue. We will add it to Readme file.

      19. If you are good at English, please correct my English :grin: . If you are good at other languages, please create a Readme file in those languages.

      20. If you like the project, please share it with the other designers and developers, and star :star2: the project. ??

      21. Inspirations

      22. IBDesignable and IBInspectable - The entire project is based on that.
      23. Sketch - Interface Builder should be as easy as Sketch to use.
      24. Framer Studio - Design and preview animations in one place.
      25. Spring by Meng To - steal a lot of animation parameters from this project.
      26. Invision ToDo App UI Kit , The demo App's original design is from this UI Kit and redone in Interface Builder. We also added interaction, navigation and animations.
      27. License

        IBAnimatable is released under the MIT license. SeeLICENSE for details.

        來自: https://github.com/JakeLin/IBAnimatable

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css

        DesignandprototypeUI,interactionandanimationinInterfaceBuilder_html/css_WEB-ITnose: IBAnimatable Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable. The app was made in Interface Builder with IBAnimatable without a single line of c
        推薦度:
        標(biāo)簽: in and html
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 亚洲高清视频一视频二视频三| 在线观看亚洲av每日更新| 色吊丝最新永久免费观看网站| 全部免费a级毛片| 91精品国产亚洲爽啪在线观看| 亚洲精品无码不卡在线播放| 亚洲午夜精品久久久久久app| 人妻18毛片a级毛片免费看| 1000部夫妻午夜免费| 亚洲精品线路一在线观看| 亚洲国产韩国一区二区| 2022国内精品免费福利视频| 一个人在线观看视频免费| 国产亚洲一区二区三区在线观看 | 性做久久久久免费观看| 亚洲精品少妇30p| 华人在线精品免费观看| 亚洲国产成人五月综合网| 免费看黄福利app导航看一下黄色录像| 91成年人免费视频| 亚洲va无码专区国产乱码| 男女作爱免费网站| 亚洲夜夜欢A∨一区二区三区| 亚洲av综合日韩| 国产精品美女午夜爽爽爽免费| 亚洲第一福利视频| 黄色网址大全免费| 永久免费av无码网站大全| 久久亚洲AV成人无码国产最大| 无码精品A∨在线观看免费| 亚洲国产成人久久精品动漫| 国产精品1024在线永久免费| 久久亚洲AV无码精品色午夜麻| 2022久久国产精品免费热麻豆| 亚洲精品又粗又大又爽A片| 亚洲美日韩Av中文字幕无码久久久妻妇 | 美女露隐私全部免费直播| 人人狠狠综合久久亚洲婷婷| 国产va免费观看| 亚洲天堂视频在线观看| 日日AV拍夜夜添久久免费|