I can not choose a date in iOS, is there any known problem with RadDataForm DatePicker?
Check it out it has some strange kind of opening.
User can not understand where to click or how to turn back again.
https://youtu.be/kFCuNbd-1zU
iPhone 8 simulator with iOS 14.3
nativescript-ui-dataform: 7.0.4
IPHONEOS_DEPLOYMENT_TARGET = 13
It can display the date but I cannot change the date.
Click on datepicker
Jumps to bottom of the page below
Scroll back to up
Click on an empty area
When I click on the empty area I can see the calendar.
NOTE:
I don't have problems with other Pickers, Stepper, or Switches. Just DatePicker does not work.
The iOS 14 date and time pickers implementations work not good at least for now. As a solution, I use the old "inline/wheel" style of date/time picker. You can do it this way:
// your template
<DatePicker (loaded)="onLoad($event)"></DatePicker>
// your controller
import { Device, isIOS } from '#nativescript/core';
onLoad(args) {
if (isIOS && Device.osVersion >= '14.0') {
args.object.ios.preferredDatePickerStyle = 1;
}
}
Related
On macOS, SwiftUI Menu buttons appear initially disabled. Once you click on them, they activate as normal and display properly. This code replicates the problem:
Menu {
Button("First") { }
Button("Second") { }
} label: {
Image(systemName: "gearshape.fill")
}
.padding()
Which initially will look like this:
Then after clicking on the button:
Preview shows correctly, but a running app behaves as above
The contents of the menu don't seem to affect the result
Tried explicitly mucking with disabled state using .disabled(false); no joy since it isn't really disabled
I could just set the foreground color of the image, but I was hoping to figure out the real problem. Am I missing something?
EDIT: Setting the foreground doesn't work either. Still visibly disabled.
This bug (filed as FB8976414) remains as of macOS 11.3. I got some help from #kontiki on a workaround, though. If you include a Button along with the Menu, it displays properly enabled. Don't ask me why. You can make the Button zero-sized so it doesn't affect your layout and just remove it when (if?) the bug gets fixed.
-- Update --
As of macOS 11.4, this technique no longer works. The Menu always displays as disabled until it's clicked. I guess if you look on the bright side, at least it's more consistent!
-- --
HStack(spacing: 0) {
Menu {
Button("First") { }
Button("Second") { }
} label: {
Image(systemName: "gearshape.fill")
}
Button("", action: {}).scaleEffect(x: 0, y: 0)
}
-- Update 2 --
As of macOS 12.0 according to #Taylor (verified by me in macOS 12.1), the bug is fixed. Thanks, Apple engineers!
I'm implementing a date picker (with native calendar style) for a macOS menu bar utility built with SwiftUI. This is being achieved with the following code:
DatePicker(model.datePickerLabel,
selection: $viewModel.selectedDate,
displayedComponents: .date)
.labelsHidden()
.datePickerStyle(GraphicalDatePickerStyle())
Nothing wrong with it, and it's also behaving properly, but I would like to set the color/tint for the day selected by the user. The tint/color seems to be only applied to the current day of the calendar, while having a greyish background when a different day is selected (in light mode). This is not right especially given that, while in dark mode, selection is not even marked with any color whatsoever.
Current day selected in dark mode (April 04):
Another day selected in dark mode (April 05):
Apparently was a bug. Seems to have been solved in macOS 10.15.4.
This is my first iOS app, designed explicitly for the iPhone, not iPad, but apparently Apple won't put it on their store unless it will run on a iPad as well. I'm at a total loss as how to "fix" this. I've searched everywhere for suggestions and nothing I've tried works (including here on StackOverflow). I can run the app in the iPad simulator and get the same results as Apple does, but can't seem to find a fix. This is proving extremely frustrating, especially when one considers that this app won't run on a iPad because it needs access to a cellular network.
I'm using the latest Xamarin for Visual Studios and I'm using Visual Studios 2013. There is no mention of the iPad in Info.plist or anywhere else for that matter
Anyone have any suggestions?
R/
Prescott ....
You are receiving this from Apple because you might have indicated your app is an Universal App.
To indicate your application will only run on iPhones you need to set this in the info.Plist file if using Xamarin Studio. When using Visual Studio this is in the project properties. The option is called "Devices" make sure you select iPhone/iPod from the dropdown list.
Device selection in VS2017
I know you said you are using 2013 but this might give you an idea.
All,
Apple requires that apps run on all iOS platforms. Accordingly I had to add constraints to my storyboard to adjust the location of subviews on each screen. Because adding each constraint is tedious, I used Cirrious Fluent Layout which worked very well for me. Below is the code I used on my screen that included a imageview. This was the most complicated screen to "fix" because (apparently) the imagevies somehow changed all the screen sizes, being an iOS developer novice, I had no idea why this worked, only that it did.
First I needed to add the reference:
using Cirrious.FluentLayouts.Touch;
Code:
//This line is required to turn off all autosizing/positioning
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
// Get the screen dimensions and the middle of the screen
// for button positioning
var barheight = this.NavigationController.NavigationBar.Bounds.Height;
// Height of the navigation bar
var height = UIScreen.MainScreen.Bounds.Height;
var width = UIScreen.MainScreen.Bounds.Width;
int middle = (int) UIScreen.MainScreen.Bounds.Width / 2;
// We cast to int to truncate float,
// int will convert implictly to float when used (Visual Studio).
var heightavailabletoimageviw = height -74 - 47 - 26 - 60;
// 74 is the height of the banner, 47 is the height of the buttons and
// 26 is the height of the title label plus a 5px gap The rest of the
// screen is available for use by the image view,
// set heightavailabletoimageviw to this value
// Had to subtract 60 because the image view still overlapped
// the buttons, no idea why. Anyone?
// Had to add a constraint to the imageview because if I didn't
// it automatically scaled to the size of the image, not good.
ThePhoto.AddConstraints(
ThePhoto.Width().EqualTo(UIScreen.MainScreen.Bounds.Width),
ThePhoto.Height().EqualTo(heightavailabletoimageviw)
);
// Had to fix the size of the imagebutton otherwise the button size
// scaled to the size of the image
btnPhoto.AddConstraints(
btnPhoto.Width().EqualTo(62f),
btnPhoto.Height().EqualTo(47f)
);
// Now we add the constraints to the viewcontroller to finish up.
View.AddConstraints(
// Can't cover the navigation bar (unless it isn't there, mine is),
// this value sets all other relative positions
Banner.AtTopOf(View, barheight),
Banner.AtRightOf(View, 0),
Banner.AtLeftOf(View, 0),
lblTitle.Below(Banner, 0),
lblTitle.WithSameWidth(Banner),
ThePhoto.Below(lblTitle, 5),
ThePhoto.WithSameWidth(lblTitle),
// I have no idea why, but I had to use negative
// values for the buttons to appear on the screen,
// otherwise they were off screen.
// If anyone could explain this, I would appreciate it.
btnUpload.AtBottomOf(View),
btnUpload.ToLeftOf(View,-60),
// Same here, had to use negative values for button to
// position correctly on the screen
btnPhoto.AtBottomOf(View),
btnPhoto.ToLeftOf(View,-(middle + 31)),
// Again, same thing.
btnMainMenu.AtBottomOf(View),
btnMainMenu.ToRightOf(View,-80)
);
This is how I solved my problem, I re-submitted the app and it now appears on the app store at: https://itunes.apple.com/us/app/oml-photo-manager/id1212622377?mt=8.
Hope this helps someone ....
R/
Prescott ...
Building a Today Widget in iOS, and my view doesn't take up the full width of the screen:
See in the above screenshot that anything that goes beyond that point of the screen gets cut off.
I have set this up using the standard storyboard provided with the Today Widget extension:
This is confusing to me because I see plenty of other app's Today extensions use the full width of the screen.
you need to implement widgetMarginInsetsForProposedMarginInsets: like this
func widgetMarginInsetsForProposedMarginInsets(defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets {
return UIEdgeInsetsZero
}
check Apple Doc - Design the UI
I am using Kony 5.5 plugin then took build for BBQ10. I declared red colour for the button in the skin. But the colour has not applied to the button means black colour button displayed instead of red colour button in the Q 10 device. I want to change the colour of the button. Please give me solution.
A couple of things to check:
1. make sure that under the Skins for the button widget, there is not a forked setting for BB; you may have changed the "Common" skin, but if there is a declared skin specifically for BB, then it will override your settings.
2. Try adding a new button just to test, specifically set the color to red, and see if that button is displaying properly. This will show if there is an overall issue or just an issue with the button you are trying to configure ( this is more of a sanity check than a technical fix )
Customized skin using colour doesn't work to Blackberry 10 devices.It is a limitation of Kony platform.Please read documents the following link.
Docs
First you have to check whether you choose skin option for button then check its under common. Because you may choose on Windows, iOS or other. Try this:
//Defining the properties for a button with skin: "btnSkin".
var btnBasic = {
id:"button1", isVisible:true, skin:"btnSkin",
focusSkin:"btnFSkin", text:"Click Here"
};
var btnLayout = {
containerWeight:100, padding:[5,5,5,5],
margin:[5,5,5,5], hExpand:true, vExpand:false,
displayText:true
};
var btnPSP={};
//Creating the button.
var button1 = new kony.ui.Button(btnBasic, btnLayout, btnPSP);
//Reading skin of the button.
alert("Button skin ::"+button1.skin);