The following line is also executed in iOS 5 since [TWTweetComposeViewController canSendTweet]
is returning YES
so the second part of the OR
check is not evaluated, since the first one already returned YES
:
[SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]
You might want to change those if statements to something like:
if ([TWTweetComposeViewController canSendTweet] ||
(
slComposeController != nil &&
[SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]
)
) {
This makes sure, that SLComposeViewController
is only used, if the class actually exists.