Questions tagged [material-components-ios]

Modular and customizable Material Design UI components for iOS.

Modular and customizable Material Design UI components for iOS. https://github.com/material-components/material-components-ios

73 questions
7
votes
1 answer

No such module 'MaterialComponents.MaterialCards_ColorThemer'

I am new in swift development Im trying to implement Material Card in my App. I've Installed 'MaterialComponents' using Cocoapods. I can import MaterialComponents in my ViewController but when I go and import import…
7
votes
1 answer

Swift: MaterialComponents TextFields Unexpected Placeholder Behavior when clicking fast

I have open the issue at MaterialComponents on Github already but seem like no answer yet. The problem is when I click the textfield to be active then I click outside, it was working fine but when I repeat doing that, the placeholder for the…
6
votes
2 answers

Add Textfield MDCAlertController IOS

There is no method similar to the addtextfield method in Uialertcontroller. I haven't found any examples of how I can customize MDCAlertControllers. Anybody have an idea?
ulaserdegor
  • 371
  • 5
  • 10
6
votes
1 answer

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,
5
votes
0 answers

MDCTabBarViewController Get Bar To Top Position

I'm using iOS Material components in my app and I came across the Tabs here. Implementing it was easy and after I made a few minor changes to match my design the result was what I wanted: I achieved this using the following code: func setupTabBar()…
Marnus Steyn
  • 1,053
  • 2
  • 16
  • 44
5
votes
1 answer

How do I make Bottom Sheet show on viewDidLoad()?

I want a bottom sheet to show on a scene with Google map on viewDidLoad() but the only bottom sheet example I found on the material.io website gets triggered with a button.How do I use MDCBottomSheetController to achieve this?
Stone Cold
  • 166
  • 1
  • 2
  • 8
4
votes
2 answers

swift MaterialComponents.MDCTabBarView mdc_customView is not working fine

I'm trying to add customView to the MDCTabBarItem using mdc_customView but the items are not taking correct width and the results is as below if I don't set the mdc_customView value then the result is as expected but without the custom design Code…
ANeme
  • 731
  • 5
  • 19
3
votes
2 answers

Change MDCTextField Outlined text fields' active border color

my textfield How do I change the colour of MDCTextField's outline from purple to .systemBlue?
3
votes
3 answers

TextField with Label over the border at Top-Left position

I need to implement outline textfield with placeholder in my swift project one like the Material UI. I tried googling for the same but could not found anything. Anyone know how to achieve it in swift? Reference Images:
Niraj
  • 207
  • 1
  • 3
  • 11
3
votes
3 answers

I am trying to add MDCCard in Swift to get Material Card View using Material Components. Error : No such module 'MaterialComponents.MaterialCards'

I am following this tutorial - https://material.io/components/ios/catalog/cards/ It tells me to add pod 'MaterialComponents/Cards' in addition to pod 'MaterialComponents' On running pod install, I get the following error - CocoaPods could not find…
user3911483
  • 108
  • 10
2
votes
1 answer

MDCOutlinedTextArea difficulties in settings up height and margins

I'm creating a MDCOutlinedTextArea and adding it to a container view, wit the following code: let textArea = MDCOutlinedTextArea(frame: container.frame) textArea.label.text = placeholder textArea.placeholder = placeholder let…
R. Campos
  • 947
  • 1
  • 10
  • 26
2
votes
0 answers

MaterialComponents show error in xcode 12.2

I am using pod 'MaterialComponents/TextControls+OutlinedTextFields' in Xcode 11.3 that is working fine, but same code run in Xcode 12.2 that is so error on import MaterialComponents.MaterialTextControls_OutlinedTextFields And the message is >> No…
2
votes
1 answer

Any way to change the Chip background color from MDCChipField without Material Theming in Swift?

Added Chips from MDCChipView() let chipField = MDCChipField() let chipView = MDCChipView() chipView.titleLabel.text = "text" chipField.addChip(chipView)
2
votes
0 answers

iOS Material Components MDCButton change Text color when button is pressed

I am using an MDCButton with a storyboard, how can I set the text color when the button is pressed (or in a highlighted state). I am using MDCSemanticColorScheme to set the color scheme of the button. Basically I need to contrast the titleColor with…
2
votes
1 answer

MDCChipField Swift - scrollable direction

I am trying to use MDCChipField, the material design component for Swift. I am implementing the 'input chip' type and am able to add the entered text as a chip with let mdcSearchField = MDCSearchField() mdcSearchField.addChip(chipView) When the…
1
2 3 4 5