xcode

iOS: Change the Orientation of the Status Bar

Lets see how to change the orientation of the status bar programmatically in an iphone/ipad application. There are four orientations: Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight. The UIApplication class provides a centralized point of control and coordination for applications running on iOS. Every application must have exactly one instance of UIApplication (or a subclass of UIApplication). When

iOS: NSNotificationCenter – broadcast

iOS: NSNotificationCenter – broadcast information within a program

An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. An NSNotificationCenter object is essentially a notification dispatch table. Objects register with a notification center to receive notifications (NSNotification objects) using the addObserver:selector:name:object: or addObserverForName:object:queue:usingBlock: methods. Each invocation of this method specifies a set of notifications. Therefore, objects may

xcode

iOS: Check whether internet connection is available

Here, i am just checking whether network connectivity is available to a server and its done synchronously. You can use Reachability if you need notifications when there is any change in the network connectivity. For this you have to include the SystemConfiguration.framework in your project. Now add, #import "SystemConfiguration/SystemConfiguration.h" and the below function to your