开发者

iPhone - How can I right align PSTextFieldSpecifier of settings bundle

开发者 https://www.devze.com 2023-01-29 10:24 出处:网络
I\'ve settings bundle in my iPhone application. How 开发者_如何学运维can I right align the PSTextFieldSpecifier value?This worked for me. If you open the property list (Root.plist) file as a source an

I've settings bundle in my iPhone application. How 开发者_如何学运维can I right align the PSTextFieldSpecifier value?


This worked for me. If you open the property list (Root.plist) file as a source and paste the following for each entry you want right-aligned:

    <key>IASKTextAlignment</key>
    <string>IASKUITextAlignmentCenter</string>


Have the same desire. What I currently do is to put some space bars after my title. So I have to text fields in my settings, Account and Password:

Account  TheName
Password *****

now I would count the chars that I need to get the same length of both strings. In this case the "Account" label has one char less then the "Password" label. So I would put the remaining characters count twice and append them to the label. In this case the label would be "Account " (2x " ")

following I will replace the " " with "_" so that you can see the difference

Account__ TheName
Password *****

It looks different sized in your XCode Settings Bundle but on the device or in Simulator it will be fine

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号