You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please can you in the next release add key "centered" for an element which is a bool value with false by default and if you set it to true in .json config file then your element is centered horizontally ?
In fact I was unable to center my play button in my bottom bar without this parameter :(
I made changes quickly in my local project and it's work perfectly. You can see the final result on simulator iPhone XS Max on iOS 12.1 :
In my VideoPlayer.json config file I can add this key "centered". An example:
I modified a little part of the code in Bar.swift file to this with adding if else condition:
// Position them.
var left = CGFloat(0)
for element in elements {
if element.centered == true {
element.view.center.x = center.x
} else {
left += element.marginLeft
element.view.frame.origin = CGPoint(x: left, y: (size.height - element.view.frame.size.height) / 2)
left += element.view.frame.size.width + element.marginRight
}
}
Hi,
First thank you for your job!
Please can you in the next release add key "centered" for an element which is a bool value with false by default and if you set it to true in .json config file then your element is centered horizontally ?
In fact I was unable to center my play button in my bottom bar without this parameter :(
I made changes quickly in my local project and it's work perfectly. You can see the final result on simulator iPhone XS Max on iOS 12.1 :
In my VideoPlayer.json config file I can add this key "centered". An example:
"bottomBar": {
"backgroundColor": ["#ffffff"],
"height": 65,
"elements": [
{
"type": "toggleButton",
"identifier": "play",
"height": 65,
"image": "video_player_play_button",
"toggledImage": "video_player_pause_button",
"centered": true
}
]
}
Don't hesitate if I can help.
Thanks.
The text was updated successfully, but these errors were encountered: