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
#import <UIKit/UIKit.h> | |
@import SafariServices; | |
@interface AViewController : UIViewController | |
// | |
// ... | |
// | |
@end |
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
#pragma mark - BTDurableView | |
@interface BTDurableView : UIView | |
@end | |
@implementation BTDurableView | |
// |
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
NSString *html = @"<div style='font: 18pt Helvetica-Light; color: #3498DB;'>Blue Text<span style='color: #AAAAAA;'>GreyText</span></div>"]; | |
NSData *htmlData = [html dataUsingEncoding:NSUTF8StringEncoding]; | |
NSMutableAttributedString *htmlAttributedString = [[NSMutableAttributedString alloc] initWithData:htmlData options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType} documentAttributes:nil error:nil]; | |
[label setAttributedText:htmlAttributedString]; |
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
// | |
// UILabel+UtilityAttributes.h | |
// | |
// Created by Paulo Almeida on 1/31/14. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UILabel (UtilityAttributes) |
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
/* | |
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes | |
* with a large amount of static geometry entities. | |
* | |
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
#define kDefaultFontSize 24.0 | |
myTextView.text = @"Some long string that will be in the UITextView"; | |
myTextView.font = [UIFont systemFontOfSize:kDefaultFontSize]; | |
//setup text resizing check here | |
if (myTextView.contentSize.height > myTextView.frame.size.height) { | |
int fontIncrement = 1; | |
while (myTextView.contentSize.height > myTextView.frame.size.height) { | |
myTextView.font = [UIFont systemFontOfSize:kDefaultFontSize-fontIncrement]; |
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
#ifndef FILELOGGING | |
#define FILELOGGING | |
#ifndef DEBUG | |
#define FLOG(args...) | |
#else | |
#define kLOGFILEPATH @"/path/to/log/file.log" | |
void _FLog(const char *functionName, int lineNumber, NSString *msgFormat, ...) { | |
va_list ap; |