Sticky buttons on iPhone program - ios

Hullo,
I have an app view rather crowded to insert the necessary switches in order to toggle 6 values associated to icons. So I would have appreciated if it were possible to make them sticky buttons, namely to have them independently keep the pressure when clicked in order for me to read the ones in that state when exiting the view.
I read there exists such a technique for Mac but that does not translate to iOS. Hw could I do that?
Thanks, Fabrizio

It sounds like you're looking for a checkbox functionality. Have the button change images when it's pressed, then use that to determine its state.
I'm on my phone so this took a bit, but here's a link to how to make a checkbox in objective-c What is the best way to make a UIButton checkbox?
Note that you don't need to use normal checkbox images.

Related

MvvmCross dialog on android, modal on ios

I have a screen with 1 button. When clicking that button, a list of items should be shown (in which the user can select multiple items).
On android, i would like to do this using a dialog. I create a "DialogService" that does this, no problem.
On iOS, however, it seems that the best practice is to display a fullscreen tableview, for example as a modalView. Is it possible to do this without using a custom viewpresenter (e.g. modalViewPresenter)? I would very much prefer to have identical navigation on both platforms and just have different implementations of "DialogService"
I think trying to make one platform look and act like another is generally not a great idea as things start to look weird for the users.
But if you want to do it anyway I would start by trying to do something like this https://stackoverflow.com/a/29910246/1107580 (it is in objective-c) then trying to bind to the tableview that is in the alertcontroller.

Have a custom number pad in iOS to dial number

I am making an app through which the user dials the number.I want to design my own number pad with delete button.I can make them easily by taking 10 buttons on the UIView and placing them accordingly and whenever the button presses i will have the button number updated in my dialer box.
I want to know whether my approach is good or there is something else through which i can achieve this in a better manner.
You can do this by using following 3 ways,
As comment given by #nerowolfe i.e. by using keyboardType equals to UIKeyboardTypePhonePad...
You can get many keyboard type click here
Using UIView with array of buttons inside it as you think.
If you are building this app for ipad then you should use popover instead of UIView or any custom vies. Using popover is more standard way than custom view for ipad. It gives benefits like,
Requires small space
Good look
Standard way
My suggestion to u is that if you are building app for iphone then option 1 or 2 is better and if you are building it for ipad option 3 is great...

iOS best practices with dynamic content

I'm building an iOS with bilingual content, the user will be able to switch between languages at any point and the content will be updated to the selected language. What is the best way to keep track of all of my UIView components to facilitate the language switch?
The options I see are;
Make each element that could possibly change a property of my ViewController;
Give each element a tag and grab the elements with viewWithTag when required;
Throw out the whole container view and rebuild it from scratch.
To be honest none of these 3 options sound ideal, are there others options I haven't thought of? What is considered the best way to keep track of multiple elements?
Thanks,
Edit 3 Mar 2014
More details.
The app will have two versions of all the dynamic content, French and English. Only one language will be displayed at a time, but the user will be able to switch languages at any time and all of the displayed content should be updated.
App description.
The app is part of an instillation and will be run in kiosk mode with a landscape orientation. The left hand 2/3 of the screen will be a horizontal scroll view though which the the user can page though the content. When the user sees content that they wish to investigate further a vertical scrollview will slide up from the bottom and fill the right hand 1/3 of the screen. The user will then be able to page though details on the content. It is this dynamic detail content that I am currently working on changing according to language.
What I'd do is subclass all "basic" components (UILabel, UIButton and others) and make them respond to a global, custom NSNotification sent by your controllers when the user switches a language, with the use of the global notification center ([NSNotificationCenter defaultCenter]). That way, anyone has a chance to update.
In a recent localisation attempt we just made every visible string an outlet and defined them as NSLocalizedString, then we have plist dictionaries for each language. It takes awhile to get all set up, but is relatively easy to maintain once it's there!
Not saying that's the best way, but that's what we did!
https://developer.apple.com/internationalization/
That link may help you! :)

How do I support VoiceOver in UIPickerView on an iPad running an iPhone only app (non-universal)?

Generally I look at Apple's UICatalog sample code for basic VoiceOver support however it looks like there is VoiceOver support for UIPickerViews in the sample code. Do I need to provide an accessibilityLabel method somewhere to add VoiceOver support? I tried to implement UIPickerViewAccessibilityDelegate methods but voice over only reads the labels in my picker view and not the hint to swipe up or down to change the values.
Also my picker view is set to the input view of a UITextField. So I'm not sure if that is relevant or not.
Update:
https://github.com/stevemoser/VoiceOverPicker
I created a sample project demonstrating the issue. In the example there is a normal picker view shown and a textfield. There is also a picker that is set to the textfield's input view property. I can't seem to activate the either picker just by tapping on it while using VoiceOver. Though I can activate either one by swiping (left and right) through the views on screen. Any ideas?
Update 2:
Looks like if the app is an iPhone app running on an iPhone or an iPad app running on an iPad it works fine but if it is an iPhone only app running on an iPad, tapping to select a UIPickerView doesn't work.
Are you just doing a vanilla UIPickerView using titles for each row (and not custom views)? If so, there isn't anything that you should have to do.
You mentioned that VoiceOver was correctly reading the label on each row, so we know that the UIPickerView correctly has isAccessibilityElement set to YES. It's also correctly reading the accessibilityLabels.
Is it possible that you're interacting with the picker before it has a chance to read the accessibilityHint? (For the benefit of others, the accessibilityHint is the "swipe or down with one finger to adjust the value" that Steve mentioned in his question.) Or perhaps some notification is changing the VoiceOver focus before the hint has a chance to be read?
By default, if your picker view is accessible, when you focus on it with VoiceOver it will read the something along these lines:
"[ROW LABEL] Adjustable [#number] out of [#total] picker item" a 2 to
3 second pause then "Swipe up or down to select value"
A few of things to note:
There is a 2 to 3 second delay between reading the label and the hint, make sure you wait for it.
If you're providing your own hint, the default one will not get read I believe
Hints are only read when you reach a certain control by either directly pressing it or by swiping right or left to the control. it will not get read if you do a 2 finger swipe down or up.
Make sure you're testing on an actual device and not a simulator as it does not show all of the things VoiceOver announces.

How can I build a large version of the info-button on iOS?

For my next iOS app, I'd like to include a button to access an info screen - the typical use case for the infoButton. However I'd like to have it displayed larger than its stock size. Is there a way to do that using standard iOS icons or do I have to roll my own?
(Please note that I'm not interested in increasing the tap area, the "i" should also be larger.)
You can easily just find some art that is a bigger 'i' and use it as a custom button but I don't think you can adjust the button from Apple.

Resources