Комментарии:
editing on label is not working buddy in my code
Ответитьcan you change the font of the Text in the picker (style = MenuPickerStyle) ?
ОтветитьFor the love of God, stop saying "a-TRIB-utes"
We stress the FIRST syllable with the word: attributes.
hello nick , the Label is not showing in the picker for xcode 14 , I've surffed the web about this problem and no one have an answer , so if you know how to solve it please upload a new video about it .
thanks
This is how I did it to costumes the picker for the new update , I embedded the picker inside a menu {} label{} :
@State var selectedNumber: Int = 0
var body: some View {
Menu {
Picker(selection: $selectedNumber , label: EmptyView()) {
ForEach(0..<18){index in
Text("\(index)")
}
}
} label: {
cosutomlabel
}
}
var cosutomlabel: some View {
HStack{
Text("Choise: ")
Text("\(selectedNumber)")
}
.foregroundColor(.white)
.font(.title)
.fontWeight(.bold)
.padding()
.background(.blue)
.cornerRadius(10)
.shadow(color: .blue.opacity(0.3), radius: 10, x: 0, y: 10)
}
}
Thank you for these Tutorials! Is there any native functionality to have a picker that allows multiple selections? e.g. whe i want a user to be able to select up to 3 options at a time? it seems that you have to build a workaround using a list...
ОтветитьThanks for styling the picker! on the todoList set pages per segmentedControl
ОтветитьHow would you get this picker to display on a ViewController?
ОтветитьiOS 16+
Put the picker in the list
ex)
List {
Picker(selection: $selection) {
ForEach(filterOptions, id: \.self) { option in
Text(option)
.tag(option)
}
} label: {
Text("Filter")
}
.pickerStyle(.inline) // .automatic .segement whatever
}
Picker for iOS is changed in iOS 16. Could you make update for this?
ОтветитьI think Xcode Version 13.4.1 has bugs with the label parameter. It doesn't seem to affect the Picker() in the canvas or the simulator. You might be about to find a work around on Stack Overflow.
ОтветитьYou can pick your nose. You can pick your friends. But you can't pick your friends' nose.
ОтветитьLove this tutorial, seems as though the ability to customize the picker itself has some issues with iOS 15 (basically no matter what code you have itll just show the raw text), and this works perfectly fine if i load it onto an iOS 14.5 sim, has anyone found a way to make it work? I've seen a workaround to use Menu instead of picker but given the amount of people facing the issue i find it odd its been like this and also so close to iOS 16 release
ОтветитьHi Nick, great video as always but I am afraid there is a big issue when placing two pickers side by side. The select overlays hit boxes clash and you have to select before the picker or after the picker to update the number. Luckily someone has provided an extension override.
extension UIPickerView { open override var intrinsicContentSize: CGSize { return CGSize(width: UIView.noIntrinsicMetric, height: super.intrinsicContentSize.height) } }
Would it be possible for you to create a tutorial on creating dropdown pickers and storing that data in a firebase collection?
Essentially creating a collection for user profile information, and then create a variable for gender that is displayed as a dropdown picker in the UI interface.
Thanks for the video lesson! You made my day!
ОтветитьThank you for your brilliant videos!
ОтветитьHi. Am currently teaching myself swift using ur tuts all is smooth apart from this picker is there another way to implement it am using Xcode 13.4 and apparently the picker is working but not the label part the text component and it’s modifiers.
ОтветитьI’m running iOS 15 and Xcode 13. In my first picker the picker is going from 99 to 18 even though I have 18..<100. I also see in your examples they’re not “in order” when you’re working with the strings. Is it a bug in Xcode?
Ответить