How to create pass with custom design? - ios

Have a pass with Store Card style. How can I add 2nd row with data and change the label position (label should be below the value)? When I add second item in secondaryFields array it inserts the item in the 2nd column, the same row. Thanks.
Image as example:

If you have a look here "Pass Style Sets the Overall Visual Appearance":
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Creating.html#//apple_ref/doc/uid/TP40012195-CH4-SW45
It gives an overview of what fields are allowed on the different pass types.
To achieve what you describe you want to make the pass a generic pass and specify both secondary and auxiliary fields.
To switch the label to be below the data, you need to flip the values when specifying them, so set label ="Gold" and the value="Level". However it will still have the same formatting (the top one will still be smaller text)

Related

how can i combine cells in fastreport?

i have a table. to print like this
https://up.djelfa.info/uploads/155762484493151.png
I want to make the observation take the whole table means it remains empty. The empty box takes all the table.
https://up.djelfa.info/uploads/155762492124361.png
im working with fastreport 5 vcl
master data
https://up.djelfa.info/uploads/155762509600791.png
Per your last link, it appears that you have hard-drawn the cell lines in your master data row. This means they will print for each row. There are, however, multiple ways to get around this:
Make the upper and lower lines for your Observation column separate objects (e.g. LineObsTop and LineObsBottom). Then, in the MasterData Band's OnBeforePrint, adjust the visibility of these based on the values of the column
Don't hard-code cell lines! Instead, make sure the cell fields all align perfectly and use the fields' Frame properties. Then use the Observation field's OnBeforePrint to adjust the frame based on value.
Similar to #2, but use conditional formatting for the cell, adjusting the frame.

VoiceOver accessibility focus on a series of elements

Say I have a dialog box like this:
and I want to focus on title, then body and then each button one after another. I am able to focus on body using
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, dialog.bodyLabel);
but is there any way to define a set of elements we want to focus instead of a single one?
EDIT:
I have also tried to make a list of elements I want to focus on using this syntax:
dialog.accessibilityElements = #[dialog.titleLable, dialog.bodyLable, etc];
but it just reads the first element (in this case dialog.titleLable) and doesn't move to the next one. Any thoughts?
The default value is set to NO for all the elements.
set the isAccessibleElement to YES for the all individual elements in the dialog
and then you can do
dialog.accessibilityElements = #[dialog.titleLable, dialog.bodyLable];
so that voice over reads title label first and body label next.

Is it possible to refer to a cell by name or label?

If I put some data in a given cell, can I refer to that cell by an arbitrary name or label? For example, if I put the value '0.454' in cell B2, can I assign it a name like 'pounds_per_kg'. I'd like to be able to use 'pounds_per_kg' for calculations performed on other cells, rather than '$B$2' or similar.
You can create a named range by selecting Data > Named ranges from the menu. You can create a one-cell named range and use the range name in your calculations without any problems.
The solution is described in detail here.
i hope this will help you go to your Sheet and in menu section go to Format -> Conditinal Formating here you can give validation what you want?

UserInteractive Substring in text Label

i am generating a label in a view with label text retrieving from a JSON file.
now there are certain texts(values) retrieved from the JSON file that are user interactive texts (URL/some action) and some are not.
Now i am retrieving the data which are user interactive, setting them as text of a UILabel (which i created dynamically) and setting it in the view (PS. my view controller only has a 2 views inside,one that is default and another in which i am generating the label).
The problem that is arising is that the interactive strings(labels) are set in one line and the ones that are not interactive are set in the next line(as i am creating individial labels for them) even if its a single word.
I want to set the labels (with the texts - interactive/noninteractive) side by side untill there is no space.
Cant wrap my head around it because its a logical problem.
Any help is appreciated

TDBGrid columns design time or run time?

I am using TDBGrid for the first time.
I didn't even notice the Columns property in the object inspector and everything went just fine: the grid was filled.
Then I saw the Columns property and tried it. When I use the object insector to add items to the Columns property of the grid, they do not all of them show up at run time. To me, it looks like the FieldName property is important. It looks like it is correct, but there are no values in some columns.
If I leave this property blank (no columns at all) it seems that the control populates it itself at run time and I do see all the columns. I could live with that. When I set column titles at run time it works, but setting column width does not.
[Update] Thanks for the feedback. I am learning slowly. Now I see what is happening. I wanted three of the five columns to be calculated. Two are gotten from INNER JOINs and the third from an SQL 'cast' of SELECT ... FROM_UNIXTIME(<table>.time_stamp).
If I do not define the columns at design time then these values are populated at run time when I execute my SELECT. Cnn anyone tell me how to set things up at design time? Thanks
There is no difference in functionality between runtime and designtime set up columns. That is: what can be done designtime can also be done runtime, and vice versa.
When te Columns property is kept empty, the grid fills it by default with all fields it finds in the linked dataset, once the dataset is opened. All column specific settings, such as alignment, width, title caption, etc... are set to default, based on the type, length and name of the corresponding field. This is the lazy way which sure could be sufficient.
You could deside to use your own setup or modification of the columns property, for one or more of the following reasons:
Change the order of the dataset fields in which they must appear in the grid,
Truncate the width of text fields (especially VarChar fields or Char fields with a large length normally result in colums that are too wide for normal presentation and/or user interaction),
Change the alignment of the fields (normally numeric fields are right aligned by default),
Hide one or more fields from the dataset,
Etc...
These own settings can be done desingtime as well as runtime.
Using the designtime columns editor is the preferred and RAD way in need of these customizations. Open the editor by double clicking the grid or the property, or via the grid's context menu. If the linked dataset is active then the command Add all fields is enabled, which does exactly the same as if you did not select any field at all, i.e. the default behaviour as described in the second paragraph.
The best way to define the columns on a dbGrid is to doubleclick the dataset in order to create variables that the form knows about (persistent fields). You can edit various properties of these variables such as DisplayLabel, DisplayWidth and DisplayFormat.
You can also add calculated fields by double clicking on the dialog box which appears when you double click on the client dataset.

Resources