Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use Material Components through object library/storyboard?

I'd like to know if it's possible to use Material Components dragging them from my object library directly to the storyboard views.

Thanks,

like image 852
Felipe Bernardes Avatar asked Nov 02 '17 12:11

Felipe Bernardes


People also ask

What are material components?

Material Components are interactive building blocks for creating a user interface, and include a built-in states system to communicate focus, selection, activation, error, hover, press, drag, and disabled states. Component libraries are available for Android, iOS, Flutter, and the web.

What is storyboard in Swift?

Basic Swift Code for iOS Apps Storyboards help us create all the screens of an application and interconnect the screens under one interface MainStoryboard. storyboard. It also helps in reducing the coding of pushing/presenting view controllers.

How do I see Storyboard in Xcode?

To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview.


1 Answers

Yes, You can use storyboard objects for designing MaterialDesign Components.

For Example:

If you want to have a floating button in your app, then simply drag UIButton object in storyboard and change its class Name from UIButton to MDCFloatingButton as in the following image.

Floating button

Add set constraint, title and color as you wish.

The result in simulator will look like this -

Simulator

Hope this helps..!

like image 94
Krishna Datt Shukla Avatar answered Nov 13 '22 22:11

Krishna Datt Shukla