GithubHelp home page GithubHelp logo

Comments (6)

ckarmy avatar ckarmy commented on July 16, 2024

I think this feature #1384 is not supported in all iOS versions...

from fuselibs.

ichan-mb avatar ichan-mb commented on July 16, 2024

Hi.. thanks for reporting, we will investigate it

from fuselibs.

ckarmy avatar ckarmy commented on July 16, 2024

@ichan-mb to solve the problem we need to modify iOS/DatePicker.uno from line 153 to 198 to:

                [Foreign(Language.ObjC)]
		int GetDatePickerStyle(ObjC.Object datePickerHandle)
		@{
			if (@available(iOS 13.4, *)) {
				UIDatePicker *dp = (UIDatePicker *)datePickerHandle;
				UIDatePickerStyle style = dp.datePickerStyle;
				switch(style)
				{
					case UIDatePickerStyleAutomatic:
						return 0;
					case UIDatePickerStyleCompact:
						return 1;
					case UIDatePickerStyleInline:
						return 2;
					case UIDatePickerStyleWheels:
						return 3;
				}
			}else {
				return 0;
			}
		@}

		[Foreign(Language.ObjC)]
		void SetDatePickerStyle(ObjC.Object datePickerHandle, int style)
		@{
			if (@available(iOS 13.4, *)) {
				UIDatePicker *dp = (UIDatePicker *)datePickerHandle;
				UIDatePickerStyle datePickerStyle = UIDatePickerStyleAutomatic;
				switch (style)
				{
					case 0:
						datePickerStyle = UIDatePickerStyleAutomatic;
						break;
					case 1:
						datePickerStyle = UIDatePickerStyleCompact;
						break;
					case 2:
						datePickerStyle = UIDatePickerStyleInline;
						break;
					case 3:
						datePickerStyle = UIDatePickerStyleWheels;
						break;
				}
				[dp setPreferredDatePickerStyle:datePickerStyle];
			}
		@}

basically add if (@available(iOS 13.4, *)) { and else

from fuselibs.

ichan-mb avatar ichan-mb commented on July 16, 2024

yeah.. I've made PR hopefully to fix this issue

from fuselibs.

ckarmy avatar ckarmy commented on July 16, 2024

yeah.. I've made PR hopefully to fix this issue

This is not available yet in FuseX? How can implement it?

from fuselibs.

ckarmy avatar ckarmy commented on July 16, 2024

Solved by downloading Fuselibs and uno files and replacing it in the FuseX contents folder

from fuselibs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.