This file contains hidden or 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
// adjust the textView width base on screen size and orientation | |
// the only constant width in the cells is the checkbox (64) | |
CGRect screenRect = [[UIScreen mainScreen] bounds]; | |
CGFloat width = [self isPortraitOrientation] ? screenRect.size.width : screenRect.size.height; | |
width -= 64; | |
CGRect textRect = [textView.text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) | |
options:NSStringDrawingUsesLineFragmentOrigin | |
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17]} | |
context:nil]; |
This file contains hidden or 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
TTTAttributedLabel *label = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(10, 10, 200, 20)]; | |
label.linkAttributes = | |
@{ (NSString *)kCTForegroundColorAttributeName : [UIColor redColor], | |
(NSString *)kCTUnderlineStyleAttributeName : @(kCTUnderlineStyleNone) }; | |
label.enabledTextCheckingTypes = NSTextCheckingAllTypes; | |
label.text = @"Link to http://google.com"; | |
[self.view addSubview:label]; |
This file contains hidden or 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
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData | |
## Various settings | |
*.pbxuser |
This file contains hidden or 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
""" | |
Google Mail reader. | |
The original code is: https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/gmail/base.py | |
Modifications made to create a cleaner document, and add metadata for filtering (to, from, subject, etc.) | |
""" | |
import base64 | |
import email |
OlderNewer