Open jdinse opened 8 years ago
Ok, I found out that the plugin doesn't really need the AutoLayout-Option.
Inside of the plugin, I simply opened src/ios/DatePicker.xib
with Xcode and unchecked the option "Use Auto Layout" which removed the attribute useAutoLayout="YES"
from the document tag. And voila: Building the app for iOS 6 works perfectly.
I posted the question in Intel XDK's forum as well. Someone from Intel says that the plugin does not handle all the necessary cases for using Auto Layout in iOS 6.
https://software.intel.com/de-de/forums/intel-xdk/topic/604018#comment-1852186
@jdinse Nice job on the AutoLayout-Option.
Yet I found a bug in, at least, the iphone 5s, where on the second time I called the plugin the background would fade darker (ok until here), but the datepicker would never show.
If anyone bumps into this issue, the solution is:
DatePicker.m, -showForPhone:
replace
CGRect frame = self.datePickerComponentsContainer.frame
for
CGRect frame = CGRectMake(0, height - self.datePickerComponentsContainer.frame.size.height, self.datePickerComponentsContainer.frame.size.width, self.datePickerComponentsContainer.frame.size.height);
I believe the issue was that the datePickerComponentsContainer's frame would be in the appropriate Y destination coordinate after the first show animation (due to its creation, probably). But on the second time, the Y destination would be the end of the screen, therefore it would never showup again.
With Intel XDK, when trying to build the app targeting iOS 6 and above, it aborts with an error:
It works when setting the target to iOS 7 and above.
Any ideas?