Add Gradient in Navigation Bar using Extension in Swift 3.0

Updated 8 September 2017

Save

Add Gradient in Navigation Bar

The extension is a great concept in swift in swift you can add your function is already predefined classes in swift 3.0 like String, UIView, UIColor , UINavigation , UITabbar etc.A while creating an extension you can write it anywhere in your project.To create a gradient extension you have to create an extension of UINavigationBar class.The main benefit of extension is that it will reduce many of your code lines like you have to use the gradient 5 times in your project so you have to write the same code 5 times in your project while creating an extension you have to write it only once it will also save the application memory.Example to create an extension:-

how to use Extension:- 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home