This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"height" : 540, | |
"imageURL" : "http:\/\/dkv86q98b2n3t.cloudfront.net\/139080101\/120747351478\/dfe8a47c-0b17-4e2b-b82e-42190aad87ef_640x480.jpg", | |
"width" : 720, | |
"thumbnailImageURL" : "http:\/\/dkv86q98b2n3t.cloudfront.net\/139080101\/120747351478\/dfe8a47c-0b17-4e2b-b82e-42190aad87ef_200x150.jpg" | |
} | |
{ | |
"height" : 540, | |
"imageURL" : "http:\/\/dkv86q98b2n3t.cloudfront.net\/139080101\/120747351478\/001341d0-da67-43b1-8ad1-4be35f917138_640x480.jpg", | |
"width" : 720, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[self.label setNumberOfLines:1]; | |
[self.label setMinimumScaleFactor:0.5]; // 0.5 is the lower threshold limit, you can change it to any value | |
[self.label setAdjustsFontSizeToFitWidth:YES]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) doDynamicTypeThings{ | |
self.someHeadline.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; | |
self.someBodyTextLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; | |
} | |
- (void)viewWillAppear:(BOOL)animated{ | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(preferredContentSizeChanged:) | |
name:UIContentSizeCategoryDidChangeNotification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableAttributedString *attributedString = | |
[[NSMutableAttributedString alloc]initWithString:@"someText"]; | |
NSDictionary *defaultProperties = @{ NSFontAttributeName : [UIFont defaultFont], | |
NSForegroundColorAttributeName : [UIColor defaultColor]}; | |
NSDictionary *uniqueProperty = @{ NSFontAttributeName : [UIFont uniqueFont], | |
NSForegroundColorAttributeName : [UIColor uniqueColor]}; | |
[attributedString addAttributes:defaultProperties | |
range:NSMakeRange(defaultStartLocationInIntegers, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e "\n\n----------------------starting to install gcc compiler for objective C----------------------"; | |
echo -e "\n----------------------running: <sudo apt-get install gnustep gnustep-devel>----------------------" | |
sudo apt-get install gnustep gnustep-devel | |
echo -e "\n----------------------gnustep installed----------------------" | |
echo -e "\n----------------------running: <sudo apt-get install gobjc>----------------------" | |
sudo apt-get install gobjc | |
echo -e "\n----------------------gobjc installed----------------------" | |
sudo apt-get install tree | |
echo -e "\n------------------------Making Project structure-------------" |