I'm using Xcode 7 and added a Date Picker to a static cell within a TableView via the Storyboard editor. Everything looks fine so far, but when it's rendered either in the simulator or the iPhone it shows vertical blank stripes in the Date Picker. In the example it should say September, but only the Se and r are visible: http://i.stack.imgur.com/gqo6L.png
Do you have any idea what's wrong?
Thanks
Phil
Related
I want my date picker to show the text right aligned as it is contained in an right aligned tableView. I'm using the iOS 14 default style were selecting the date picker ends up in a popover to select the date, so by default the label is left aligned when the popover is not showing.
I tried using datePicker.contentHorizontalAlignment = .right but nothing is changing.
Is there any other way to change the alignment as it is looking strange that way?
There's no explicit way to do this, since the widget itself seems to not honor the content alignment; BUT: I have found a way to do this that works with iOS currently. At some point the date picker creates a UILabel, seemingly with a 'leading' constraint, no matter what content alignment. But, we can override what that 'leading' means with clever use of semanticContentAttribute.
datePicker.semanticContentAttribute = .forceRightToLeft
datePicker.subviews.first?.semanticContentAttribute = .forceRightToLeft
This code can't crash the app, even if the widget changes, it safely access the first subview and sets an official API on it.
It does work with iOS 14.2; and
Supposing, in iOS 14.3 or 15+, Apple changes the widget structure such that this trick doesn't work, perhaps because there's another nested view, all that could happen is the layout goes back to the default.
It's possible only the second line of code is necessary, but my first attempt was with the first line, which didn't work, so I added the second line.
I just wonder that in the calendar that apple made as default if you click day in month than view' space are split
this space change can be made by just segue??
am I have to make segue and then do the detail about height and width??
I want to get idea about this problem
you can see my project in https://github.com/shinhyogeun/Calendar.git
I have problem with textview because when we set the some text into text view at run time, it not shows the whole text, its showing only few text and spaces is available in textview. So please suggest me any way to fix this problem.It was working in ios 7 but getting problem in ios 8. This is screen shot.
I have added screen shots which show the text but not whole text but when we have tapped on textview it shows full text.
Thanks.
I have a UITextbox on the bottom of my screen (which is the table you see in the graphic below).
On the iPhone 3GS/4/4S it shows up correctly on the bottom. However, on my iphone 5, it is on the same screen where it would normally be on a regular iphone, screenshot below:
Is there a way to resolve this through IB or must it be done with code?
You can see a bit of blank white space at the bottom where the last tab is cut off, it looks like its still reserving room for the input box.
In interface builder (where you're using strings & struts and NOT auto layout), you can change what you're looking at by selecting the view controller you want to work with and then, in the Attributes Inspector for the view controller, touch this pop-up menu:
iPhone 5 screen size:
iPhone 4 & earlier screen size:
You can then see the difference between the two iPhone screen sizes.
Now, to get the text field to hug (or stay aligned at the bottom), click the bottom strut for the text field. It should look something like this:
I am using an UIDatePicker in my application. When the application loads up, the picker updates to todays date and the row is highlighted in Blue as shown:
However, when I change the values in the picker, the Blue highlight does not move along to the newly selected date, here is a screen shot (notice how the old values still hold the blue highlight) :
I am adding the UIDatePicker via IB and connected with IBOutlet UIDatePicker *picker
Does anyone know a resolution here?
Thanks everyone!
I don't know that you found a bug, as much as you found a "feature." The highlighting appears to be intended to allow your user to get back to today's date. If you really don't like the highlighting, you're probably best off implementing your own custom picker.