Widget 2.0 Newtabbar Requires A Label For Each Button

I have just updated from the previous Public Release to 1076 and is trying to make my widgets work… I have been through migration guide etc. and still I have found no solution to this problem:

Although the parameter “label” is marked as “optional”, I get the error “RuntimeErrorNotification: Failed to parse error message: bad argument #2 to ‘newText’ (string expected, got nil)” if no label is specified.

This is a huge problem as all my tabButtons are images with no labels! If I apply an empty label, my images shrink which is not good.

Hope there is a work around…

Regards,

Jørn

I have just updated from the previous Public Release to 1076 and is trying to make my widgets work… I have been through migration guide etc. and still I have found no solution to this problem:

Although the parameter “label” is marked as “optional”, I get the error “RuntimeErrorNotification: Failed to parse error message: bad argument #2 to ‘newText’ (string expected, got nil)” if no label is specified.

This is a huge problem as all my tabButtons are images with no labels! If I apply an empty label, my images shrink which is not good.

Hope there is a work around…

Regards,

Jørn

Hey Jorn.

This is a bug which has been fixed and will roll out when daily builds kick off again.

In the mean time, if you just pass an empty string to label it should get you around this problem in the meantime.

Thanks

Hi Danny,

Thanks - the work around helped me move on to the next issue regarding the tab bar: It is not possible for me to create a tab bar with no button initially selected. If I define all buttons with “selected = false”, the first button is automatically selected when the tab bar is created. If I instead set e.g. button 2 to “selected = true”, this button is then the default selected.

The trouble is that I do NOT want a button selected by default initially. Can this be solved somehow, or is it another bug?

Regards,

Jørn

Hey Jorn.

This is intentional, the native iOS tab bar always sets a tab as selected initially. We followed this as a guideline. Apps would likely be rejected by Apple if they exhibited the behaviour you are looking to achieve.

Hi Danny,

Thanks again for your fast response :slight_smile:

I see your point and must figure out a proper way to handle this in my app.

/Jørn

I have just updated from the previous Public Release to 1076 and is trying to make my widgets work… I have been through migration guide etc. and still I have found no solution to this problem:

Although the parameter “label” is marked as “optional”, I get the error “RuntimeErrorNotification: Failed to parse error message: bad argument #2 to ‘newText’ (string expected, got nil)” if no label is specified.

This is a huge problem as all my tabButtons are images with no labels! If I apply an empty label, my images shrink which is not good.

Hope there is a work around…

Regards,

Jørn

Hey Jorn.

This is a bug which has been fixed and will roll out when daily builds kick off again.

In the mean time, if you just pass an empty string to label it should get you around this problem in the meantime.

Thanks

Hi Danny,

Thanks - the work around helped me move on to the next issue regarding the tab bar: It is not possible for me to create a tab bar with no button initially selected. If I define all buttons with “selected = false”, the first button is automatically selected when the tab bar is created. If I instead set e.g. button 2 to “selected = true”, this button is then the default selected.

The trouble is that I do NOT want a button selected by default initially. Can this be solved somehow, or is it another bug?

Regards,

Jørn

Hey Jorn.

This is intentional, the native iOS tab bar always sets a tab as selected initially. We followed this as a guideline. Apps would likely be rejected by Apple if they exhibited the behaviour you are looking to achieve.

Hi Danny,

Thanks again for your fast response :slight_smile:

I see your point and must figure out a proper way to handle this in my app.

/Jørn