To create label with height and width constraints here is the constraints...And don't forget to add label in to view with addSubview method
UILabel *Label = [[UILabel alloc] init];
[Label setTranslatesAutoresizingMaskIntoConstraints:NO]; | import Foundation | |
| extension Data { | |
| var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
| guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
| let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
| let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
| return prettyPrintedString | |
| } |
| override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |
| let result = super.hitTest(point, with: event) | |
| if result == self { return nil } | |
| return result | |
| } |
| { | |
| "id": 22, | |
| "title": "Сироп топинамбура натуральный 330г тест 2", | |
| "count": 10, | |
| "image": "app/img/default_catalog.png", | |
| "measure": { | |
| "id": 1, | |
| "title": "за килограмм", | |
| "sortingWeight": 1, | |
| "decimalSymbol": "г", |
- (void)uploadImage:(UIImage *)image
{
// [self requestUploadImage:image andBlock:^(NSDictionary *responseDict) {
// DLog(@"RESPONSE = %@", responseDict);
// }];
/*
NSData *imageData = UIImagePNGRepresentation(image);
[[IGSBackendManager sharedInstance] postTemplateUrlWithMultipartData:imageData