Jump to content

Set max value for PSEditTextCell


Go to solution Solved by xiaov,

7 posts in this topic

Recommended Posts

Posted

You can't with just a plist. You can probably do some code and detect the user entered value and display a popup or something.

Posted

I don't think it will work, but maybe it does.

This is the code for a PSSliderCell:

 

<!-- Begin PSSliderCell -->
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.ted2.example</string> <!-- Your package name. -->
			<key>key</key>
			<string>key1</string> <!-- Your key. -->
			<key>label</key>
			<string>Switch Text 1</string> <!-- Your Switch Name. -->
	</dict>
	<dict>
			<key>cell</key>
			<string>PSSliderCell</string>
			<key>default</key>
			<integer>50</integer> <!-- Enter the default value of the slider here. -->
			<key>defaults</key>
			<string>com.ted2.example</string> <!-- Your package name. -->
			<key>key</key>
			<string>key1slider</string> <!-- Your key. -->
			<key>max</key>
			<real>99</real> <!-- Enter your maximum value here. -->
			<key>min</key>
			<real>1</real> <!-- Enter your minimum value here. -->
			<key>showValue</key>
			<true/> <!-- Show the value of the slider. true or false. -->
		</dict>
<!-- End PSSliderCell -->

 

Maybe you could use the

<key>max</key> and <key>min</key>

in the PSEditTextCell too.

 

I'm too lazy to try though.

 

I used http://armconverter.com/mshookgenerator/ for the example btw

 

 

It might return to MAX once the person goes over it. :dunno: 

Posted

Or just make it a slider instead of PSEditTextCell. :p

Posted
55 minutes ago, Ted2 said:

I don't think it will work, but maybe it does.

This is the code for a PSSliderCell

Maybe you could use the

in the PSEditTextCell too.

 

 

14 minutes ago, DiDA said:

Or just make it a slider instead of PSEditTextCell. :p

 

No please be realistic. Sliders look ugly af on iPhone displays

  • Solution
Posted
2 hours ago, castix said:

 

 

No please be realistic. Sliders look ugly af on iPhone displays

u can set a max number:

//int x =UIeditcellnumber 

if( x > 999999 ) { 

return 999999; 

} else {

return cellnumber;

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines