سؤال

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top