Although I've set hidesForSinglePage to true, the lonely indicator is still visible. But not where the indicators normally are, but in the upper left corner (?!) of the page control. It's like it trying to hide by stepping aside, but fails by taking a few steps too little. I've been playing with all kinds of attributes, but none has even tweaked this strange behavior.
Does anyone have any clever clues?
Thanks,
Johannes
I discovered when this bug came to life, and thus come up with a solution. I had set the number of pages of my page control to 1 in Interface Builder. When I changed this to a greater number, and then let my code set it back to 1 when the NIB had been loaded, the bug disappeared.
Very strange indeed...
I got the same problem with new XCode 5 and iOS7. I didn't set up the UIPageControl via IB or Storyboard but within code. The problem occured because I had set somePageControl.hidden = FALSE; after I set the pageCount = 1. When I set hidden = TRUE before setting pageCount the single indicator disappears.
Related
I have a tableView implemented similar to the screenshot which I set the editing to true when the view is loaded up. This is to allow the user to have multiple selection option already available for them.
My problem is that I'd like to show the editing option (the round selection buttons) on the right as opposed to the usual iOS style on the left (which is how my app is atm) but I'd like to achieve what is shown in this screenshot. Anyone can advise on how to achieve that?
You'll need to have this as a checkbox within your cell's UI and handle the display (with or without animation) yourself. I'd add an isEditing flag in your tableview model items that handles that state.
Another approach would be to try reverting to RTL for that particular screen. Haven't tried that ever though and I would not recommend having something like that in production code.
[UITableView appearance].semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
or
self.tableView.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
That will most likely send the letter section to the left as well though.
experts!
Today started to build Apple Watch version for my CelebrateMore! app and can't solve one issue. I have 2 interface controllers - Page-based kind. As soon as I set segue to "next page" from first to second, my first interface controller starts to scroll much more than before.
Screenshot from Storyboard:
Screenshot from simulator during scrolling:
Screenshot from simulator if I remove next page segue and scroll:
Already from scrollbar it can be seen, that there is a lot of empty content if "next page" is used. Does anyone has some idea, how to solve this, how to avoid "the long after content scrolling" issue?
I've struggled with the same issue for several hours until I decided to give it up for a while and focus on filling the labels with actual data at runtime. After I added some code to the main initialisation methods of WKInterfaceController ((void)awakeWithContext:(id)context {} and/or (void)willActivate {} ), this scrolling issue magically disappeared. Try to set the text of one or all the labels in your interface in code in one of the 2 methods mentioned above and see if the scrolling problem gets fixed:
[self.label setText:#"Some text.."];
It worked in my case.
Due to low reputation I cannot upvote: The solution of setting the text of a label worked for me too. I set an empty text first, then load the data and update the label there again once the request is successful. It works and calculates the height of the scroll view correctly.
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
//enable correct scroll height
self.titleLabel.setText("")
self.loadData()
}
I used a different way to work around it.
First put a group in the InterfaceController, and assign fixed height to it, then put other components inside the group.
To make the group occupy full screen, its height for 38mm should be set to about 142 point and for 42mm should be set to about 165 point. You can use the plus sign next to the value to enter these values for the 2 models.
I can't seem to get NSSplitView autosave to work - can anyone confirm that by adding an autosavename in IB it should work ? I am using auto layout but my splitView is not remembering the position of the divider.
EDIT
I would expect the position of the divider to be remembered between application restarts. All I see is the divider position always starting at the default position that was set originally in IB.
Well strangely enough this now seems to be working! So I guess I can answer my own question - YES setting an autosave name in IB should result in the SplitView remembering the divider position between application launches.
No idea when it started working or why it was not working for a while. My bad no doubt.
FYI I am using a subclassed NSSplitView with autolayout. One thing I have changed is I load the right views at runtime now. Anyway for those struggling with splitViews, they can be made to work with some fiddling it seems.
If I turn the autocorrection ON, the words get autocompleted, as if I write "wor", I get "word" before I finish writing. I don't want this to happen because I might be writing "world" or any word different than the autocompleted one.
I set Correction off in the Interface Builder and this problem is solved.
The problem now is that I still need the suggestions that appear in a little popover below the incomplete words.
This two features might be different but I don't know how to activate the suggestions.
How can I solve this?
This can be solved with the use of tableview. Create a tableview with the width as of the width of the textfield and height as you like. Place it just below the textfield. Make it hidden initially. When the user starts typing, fetch the array of data that resembles to the typed text and if any exists then, unhide the table view. On the subsequent typing keep on reloading the tableview sections with animations. You should be accurate on hiding, unhiding and then reloading the data on the tableview. I have implemented such thing before. It is really easy and once you get started with it you find it easy.
In the UITextView TextViewDidChange I created a thread that changed the cursor position. This, off course happens after the text view changes. The change of the cursor position triggers the autocomplete without letting me even see that there had been a suggestion.
new bloke having issues again.I have a button on a form which is set to create another button in it's current location, then using a timer that runs
button.top = button.top + 10
for every tick, the design created (aka button creator) button moves down to just under the new button, and in the same alignment. Due to the size of the form I'm working on, once this has been done 3 times, the creator button is now askew, slightly to the right of the added buttons above it, rather than than in the same place, due to the controls now extending past the form size and the scrollbar becoming visible.
I've done some searching around, but so far the answers I have found haven't helped - probably more due to me not understanding correctly - and it's starting to do my head in because it should logically be so simple.
I thought I'd figured out the issue this evening when I realised that it's the previously added buttons which are moving from
location.x = 100
to
location.x = 91
and not the creator button changing it's habits.
Can anyone point out what is probably something so simple that I am overlooking in order to get these aligned?
Thanks in advance.
instead of using the location.x property try using LEFT property of the object...
so when you create the NEW button and set its inital position use the ThisButton.Left = Value to position it....
where ThisButton is the NAME of your button
and Value is the X location numeric value.