Color Tint UIButton Image

As of iOS 7, there is a new method on UIImage to specify the rendering mode. Using the rendering mode UIImageRenderingModeAlwaysTemplate will allow the image color to be controlled by the button’s tint color. Objective-C UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; UIImage *image = [[UIImage imageNamed:@”image_name”] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; [button setImage:image forState:UIControlStateNormal]; button.tintColor = [UIColor redColor]; Swift let … Read more

Best architectural approaches for building iOS networking applications (REST clients) [closed]

I want to understand basic, abstract and correct architectural approach for networking applications in iOS There is no “the best”, or “the most correct” approach for building an application architecture. It is a very creative job. You should always choose the most straightforward and extensible architecture, which will be clear for any developer, who begin … Read more

Status bar and navigation bar appear over my view’s bounds in iOS 7

You can achieve this by implementing a new property called edgesForExtendedLayout in iOS7 SDK. Please add the following code to achieve this, if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout = UIRectEdgeNone; You need to add the above in your -(void)viewDidLoad method. iOS 7 brings several changes to how you layout and customize the appearance of your UI. The … Read more

@import vs #import – iOS 7

It’s a new feature called Modules or “semantic import”. There’s more info in the WWDC 2013 videos for Session 205 and 404. It’s kind of a better implementation of the pre-compiled headers. You can use modules with any of the system frameworks in iOS 7 and Mavericks. Modules are a packaging together of the framework … Read more

How to change Status Bar text color in iOS

Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file. In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; Add the following method: – (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; } Note: This does not work for controllers inside UINavigationController, please see Tyson’s comment below 🙂 Swift 3 – This will work controllers inside UINavigationController. Add this code inside your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)