How can show a ghaphic indicator over Slingr low code platform? - slingr

I would like to add traffic light icon based on entity field value in given collection view. Are there some way to do it?

Not sure if this can apply to your case, but you can highlight a record in a collection view using the Record highlight feature in collection views (works on grid and cards views).
Basically, you can define conditions to decide if the record can be highlighted and which color will be used for that. You can find more information here:
https://slingr-stack.github.io/platform/app_development_ui_grid_views.html#record-highlight

Related

UI5 Generic Tile with filter functionality

I have Generic Tiles in my UI5 App. My requirement is to implement the functionality of Icon Tab Bar - Filter (https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.IconTabBar/preview) for these tiles. I have separate tile for each status and on clicking it should display the list in the table depending on the clicked status eg: 'completed tickets'.
The table and the tiles are in different views. If this is possible please provide suggestions as to how this can be accomplished.
Thanks,
Srinivasan
You could follow the example of the IconTabBar almost literally, and just swap the icons for tiles.
When you press an icon in the IconTabBar in the example, the logic connected to that icon will add a filter to the binding of the table. You should do the same: the logic connected to your tiles, should also change the filter of the table binding. Every tile could result in a different filter to the binding. With that, you would see the table filtered based on the tiles you clicked.
With your table being in a different view than the tiles, you may want to use the router to communicate between the two views. You could e.g. have tile one to navigate to /YourApp/#/Stuff/FilterBySomething and tile two to navigate to /YourApp/#/Stuff/FilterBySomethingElse. In the view containing your table, you should then pick up the filter info and add the filter to the table binding accordingly. More info on how this works can be found in Step 31 of the SAPUI5 walkthough.

iOS: Search Options UI

I am building an iPhone app for a library and I want to give few options to the user to search books by. A user can search a book by title, author, topics, or date of publication.
What I want to know what's the best way to display these search options to the user? In terms of HTML, it would be easy - either use a drop down list or radio buttons. I tried using UIPickerView but honestly, that looks terribly ugly and destroys the aesthetics of the view of my app.
The other option I was thnking was using segmented control, but is it possible to have a vertical segment control in stead of horizontal one? The selection texts can be too long.
Any ideas?
If you want a vertical segmented control, you'll have to make it yourself. Create a textured image with dividers. I would export each section as a PNG separately. Then create a picture of each section with the "pressed down" gradient and export each segment as a separate PNG again.
I would then make a new class. If there is a specific number of objects in your segmented control or this is a one time thing, the class may not even be necessary. If not, then in the class constructor pass an array with the titles of the segments in your segmented control. For the first and last objects, use the pictures you made with rounded corners. For the objects in between, use the standard pictures. Then put the titles on top. When a segment is tapped (perhaps use hidden UIButtons), you can use a delegate method to tell the main search class which one was tapped, and then the class can replace the normal picture of that segment with the pressed down one.
Thanks for the options.
I ended up creating a simple table to show my choices.
User clicks on "search by", which opens up the table with options and then when you select any option, you return back to main view with the chosen search option.

Accessibility Focus

Working with Accessibility
While VoiceOver reads the elements in the application in an order,Is there anyway to shift the focus between the elements?
I tried working with "nextResponder",but it is not working.
As of iOS 6, you can set the focus to a specific element with a UIAccessibilityLayoutChangedNotification, passing the element
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, firstBottom);
but if you're trying to completely change the “tab order” I don’t know of a way to do it.
This is a shot in the dark, but have you tried changing the accessibilityLabel or accessibilityHint in accordance when you want the order to change? If you can trick the VoiceOver to believe the text has changed, I would expect that it would change focus to it appropriately.
The timing would be the hard part, since it doesn't appear there are any delegate callbacks for when VoiceOver is crawling your view, so you may have to estimate the time to pass before trying to update the accessibility hint/value.
My last thought would be to mark the UIView that you want to bring attention to with the UIAccessibilityTraitUpdatesFrequently accessibility trait. That might be the closest you can get without tapping into hidden Apple libraries.
Check out this post for how to handle special ordering of elements for voice over. I just used this approach in the app I'm working on.
I tried UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, elementName); to change the focus on a different element. The behavior was that the focus got shifted to new element, but Voice Over would first announce the page title and then the accessible label value of the new element.
Customise Accessibility for a View:
You can customise the order(in which voice over should traverse the screen elements) by overriding accessibilityElements property of parent view in below manner.
self.accessibilityElements = [childView1, childView2, childView3]
With that voice over will follow the sequence like childView1 -> childView2 -> childView3.
Changing Accessibility focus to other element programatically:
At any time you can shift the focus to another element by using below code.
UIAccessibility.post(notification: .layoutChanged, argument: childView2)
With above code, voice over focus would be shifted to childView2 and then will follow the same sequence defined by accessibilityElements i.e. childView2 -> childView3 -> childView1... and so on
Customising Accessibility Order for Complex Views:
You can customise it further and If a view has multiple child views with further grand children views, then you can achieve accessibility order by defining accessibilityElements of main parent view by using accessibilityElements of all child views.
For example, for below view hierarchy, we have
View Controller Example
To define custom order of accessibility elements for such views, we can define in below manner.
var customElements = childView1.accessibilityElements
customElements.append(contentsOf: childView2.accessibilityElements)
customElements.append(contentsOf: childView3.accessibilityElements)
parentView.accessibilityElements = customElements

Scrollable view with text and ability to do something when specific phrase is tapped

I am trying to implement a view which will load text from sqlite database (every sentence in a text will have unique tag in database) and will allow to execute some code while sentence is clicked (on-click executed method should then scroll clicked sentence to the center of the screen and change it's color/background color/font size to emphasize it)
Is it possible without using webview and js/js-native bridge? Which approach should be taken to implement such a view? Any help and comments highly appreciated!
Hmm, you could also considering using NSAttributedString together the Core Text Framework and attribute each sentence and attach some extra info about. Next you lookup the attribute below the tap position of the view. Once you have that you can retrieve the extra info again and do whatever you want with the tap.
After the tap you could then alter the properties of that part of the text. E.g. different font colour etc.
This tutorial on the internet looked interesting:
http://www.raywenderlich.com/4147/how-to-create-a-simple-magazine-app-with-core-text

Alternatives for picker in iphone/iOS app?

I am showing a form the user fills in my iPhone app. One of the fields is a set of 2 or 3 dates from which the user has to pick one. Putting a picker, or bringing up a table view just for this takes up too much space, leaving no room for the other fields. Is there any simpler way to do this?
To do this you can put two or three arrowed label with text like "Select Date" upon click of it you can show one view that allow user to select the date; once selected you can back to the original view. You can do this for all three (or two) dates and get those date on form view.
I am giving you idea of how you can design apps; if you want code i can assist that too but from your question it seems you want design ideas.
You can go for your custom drop down/combo box, but their is no inbuilt functionality present for this.
Also following is mentioned in apple HIG guideline, you need to consider those as well-
(http://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html)
Guidelines
Use a picker to make it easy for people to choose from a set of values. It’s often best to use a picker when people are familiar with the entire set of values. This is because many, if not most, of the values are hidden when the wheel is stationary. If you need to provide a large set of choices that aren’t well known to your users, a picker might not be the appropriate control.
Consider using a table view, instead of a picker, if you need to display a very large number of values. This is because the greater height of a table view makes scrolling faster.
Use the translucent selection bar to display contextual information, such as a unit of measurement. Do not display such labels above the picker or on the wheel itself.
On iPad, present a picker only within a popover. A picker is not suitable for the main screen.