//第 1 类
int sliderMaximum;
float sliderMaximumDigital;
-(void)viewDidLoad
{
[super viewDidLoad];
class 2 *V1 = [[class 2 alloc] init];
sliderMaximum = V1.TeamAmountAfterSave;
NSNumber *yourNumber = [NSNumber numberWithInt:sliderMaximum];
sliderMaximumDigital = [yourNumber floatValue];
[sliderTeamSelect setMaximumValue:sliderMaximumDigital];
}
//类2
int teamAmount;
@synthesize TeamAmountAfterSave; (In .h file (@property int TeamAmountAfterSave;))
TeamAmountAfterSave = teamAmount;
// 此代码几乎可以正常工作,唯一的问题是我的滑块最大值设置为 0。
// PS。teamAmount 具有按下按钮的次数的值。