Skip to content
Guest Big Announcement

check for multiple if statements?

Featured Replies

Hi Guys,

 

Im trying to make a preference bundle and i am not quite sure how to check for multiple if statements.

 

I have this:

 

if(GetPrefBool(@"instaKill")) & if(GetPrefBool(@"randomThing")) {

-- stuff here

}

 

what characters would i use to achieve this?

 

also if there are any good reference sheets anyone could recommend that would be great!

first u should use k"name" for example ::  if(GetPrefBool(@"kinstakill")) and not  if(GetPrefBool(@"instaKill"))

always use k - key

 

and can u try to explain a little better what u want exactly?

  • Author

i wanted to make (in settings.app) a preference bundle, 2 switches one called kinstaKill and kotherName.

 

if i enable kinstaKill. kotherName can no longer be enabled, and vice-versa

 

in other words, i only want one of the switches to be enabled at a time until disabled


if(GetPrefBool(@"key1")) {your conditional code}

else if(GetPrefBool(@"key2")) { return %orig }

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.