Post

Replies

Boosts

Views

Activity

Reply to How to change the style of the datePicker component ?
You have several existing styles: CompactDatePickerStyle DefaultDatePickerStyle FieldDatePickerStyle GraphicalDatePickerStyle StepperFieldDatePickerStyle WheelDatePickerStyle you apply the modifier to the datePicker .datePickerStyle(WheelDatePickerStyle()) How do you need to customise ? If none of those above styles, you have to create your own picker.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to How to change the style of the datePicker component ?
You need to precise your spec a little. How many days do you want to present ? Only the selected month ? One way to do : create a scrollView each day is a 2 lines label that you set with the correct day name and number enable user interaction for each label, so that user can tap it Or you can subclass UISegmentedControl. Creating images as   lun     1 class PickerSegmentedControl: UISegmentedControl { var allImages : [UIImage] = [] // To be set before calling. Must be the right size func commonInit() { let numberOfDays = self.numberOfSegments for i in 0..numberOfDays where i allImages.count { self.setImage(allImages[i], forSegmentAt: i) } } override init(frame: CGRect) { super.init(frame: frame) commonInit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) commonInit() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Error loading Storyboard
I note object ID has changed from 'MCj-i5-HUl' to 'BYZ-38-t0r' Is it a different project ? Did you find which object has ID 'BYZ-38-t0r'. It is probably a ViewController scene. Interesting, I checked several projects: their initial scene has the same ID (probably attributed systematically by Xcode) 'BYZ-38-t0r'. The ViewController has the same ID. So, the problem is with this initial scene. Could you describe how it is composed ? To find, if you cannot search in storyboard, open the storyboard directly in TextEdit. Please tell and copy the complete XML part for the 'BYZ-38-t0r' object. Additional question: is it an iOS project (it seems so)? or a Catalyst ? what is the simulator version you use ?
May ’21
Reply to Getting mismatching height values - same device but different iOS version
Where exactly do you call: document.documentElement.clientHeight iPhone 11 physical height in landscape is 414. The difference is likely to take into account the safe area (notch and bottom) Probably, the library you use has been updated for 14.2 In addition, in Mozilla doc https ://developer.mozilla .org/fr/docs/Web/API/Document/height they advise not to use anymore: Document.height  Deprecated  This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.  Note: Starting in Gecko 6.0, document.height is no longer supported. Instead, use document.body.clientHeight. See element.clientHeight.
Topic: App & System Services SubTopic: Core OS Tags:
May ’21