public Settings() { settingsGroup = new UIPreferencesTableCell(); settingsGroup.setTitle("Settings"); ipAddressCell = new UIPreferencesTextTableCell(); ipAddressCell.setTitle("IP Address"); ipAddressCell.setEnabled(true); useAccelerometerCell = new UIPreferencesTableCell(); useAccelerometerCell.setTitle("Accelerometer"); useAccelerometerCell.setEnabled(true); useAccelerometerControl = new UISwitchControl(new CGRect(170, 5, 120, 30)); useAccelerometerControl.setValue(0.0f); useAccelerometerCell.addSubview(useAccelerometerControl); }
public float getAccelerometerSetting() { return useAccelerometerControl.getValue(); }