UIColor from Hex in Monotouch

I found some solutions for Objective C and none specifically for Monotouch I ended up developing an extension method based on the most popular solution for IOS: public static class UIColorExtensions { public static UIColor FromHex(this UIColor color,int hexValue) { return UIColor.FromRGB( (((float)((hexValue & 0xFF0000) >> 16))/255.0f), (((float)((hexValue & 0xFF00) >> 8))/255.0f), (((float)(hexValue & 0xFF))/255.0f) … Read more

addSubview SwiftUI View to UIKit UIView in Swift

Step 1: Create instances of UIHostingController by using SwiftUI View struct ContentView : View { var body: some View { VStack { Text(“Test”) Text(“Test2”) } } } var child = UIHostingController(rootView: ContentView()) Step 2: Add instance of UIHostingController as a child view controller to Any UIKit ViewController var parent = UIViewController() child.view.translatesAutoresizingMaskIntoConstraints = false child.view.frame … Read more

CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift

CGRect Can be simply created using an instance of a CGPoint or CGSize, thats given below. let rect = CGRect(origin: CGPoint(x: 0,y :0), size: CGSize(width: 100, height: 100)) // Or let rect = CGRect(origin: .zero, size: CGSize(width: 100, height: 100)) Or if we want to specify each value in CGFloat or Double or Int, we … Read more

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