It also functions in iOS versions greater than 5.1, however you must include URL schemes in the URL types in Xcode:
Then you can use
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
It's an open system WiFi setting now.