mirror of
https://github.com/zhigang1992/STTweetLabel.git
synced 2026-01-12 22:52:37 +08:00
Final commit
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
25927254167D896D003E6F65 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 25927253167D896D003E6F65 /* Default.png */; };
|
||||
25927256167D896D003E6F65 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 25927255167D896D003E6F65 /* Default@2x.png */; };
|
||||
25927258167D896D003E6F65 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 25927257167D896D003E6F65 /* Default-568h@2x.png */; };
|
||||
25927261167D8A45003E6F65 /* STTweetLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2592725F167D8A45003E6F65 /* STTweetLabel.m */; };
|
||||
2592726D167D8CB5003E6F65 /* STViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2592726B167D8CB5003E6F65 /* STViewController.m */; };
|
||||
2592726E167D8CB5003E6F65 /* STViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2592726C167D8CB5003E6F65 /* STViewController.xib */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -32,6 +35,12 @@
|
||||
25927253167D896D003E6F65 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
|
||||
25927255167D896D003E6F65 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
|
||||
25927257167D896D003E6F65 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
2592725E167D8A45003E6F65 /* STTweetLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STTweetLabel.h; sourceTree = "<group>"; };
|
||||
2592725F167D8A45003E6F65 /* STTweetLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STTweetLabel.m; sourceTree = "<group>"; };
|
||||
25927260167D8A45003E6F65 /* STLinkProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STLinkProtocol.h; sourceTree = "<group>"; };
|
||||
2592726A167D8CB5003E6F65 /* STViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STViewController.h; sourceTree = "<group>"; };
|
||||
2592726B167D8CB5003E6F65 /* STViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STViewController.m; sourceTree = "<group>"; };
|
||||
2592726C167D8CB5003E6F65 /* STViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = STViewController.xib; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -78,8 +87,14 @@
|
||||
25927247167D896D003E6F65 /* STTweetLabel */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2592725E167D8A45003E6F65 /* STTweetLabel.h */,
|
||||
2592725F167D8A45003E6F65 /* STTweetLabel.m */,
|
||||
25927260167D8A45003E6F65 /* STLinkProtocol.h */,
|
||||
25927250167D896D003E6F65 /* STAppDelegate.h */,
|
||||
25927251167D896D003E6F65 /* STAppDelegate.m */,
|
||||
2592726A167D8CB5003E6F65 /* STViewController.h */,
|
||||
2592726B167D8CB5003E6F65 /* STViewController.m */,
|
||||
2592726C167D8CB5003E6F65 /* STViewController.xib */,
|
||||
25927248167D896D003E6F65 /* Supporting Files */,
|
||||
);
|
||||
path = STTweetLabel;
|
||||
@@ -155,6 +170,7 @@
|
||||
25927254167D896D003E6F65 /* Default.png in Resources */,
|
||||
25927256167D896D003E6F65 /* Default@2x.png in Resources */,
|
||||
25927258167D896D003E6F65 /* Default-568h@2x.png in Resources */,
|
||||
2592726E167D8CB5003E6F65 /* STViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -167,6 +183,8 @@
|
||||
files = (
|
||||
2592724E167D896D003E6F65 /* main.m in Sources */,
|
||||
25927252167D896D003E6F65 /* STAppDelegate.m in Sources */,
|
||||
25927261167D8A45003E6F65 /* STTweetLabel.m in Sources */,
|
||||
2592726D167D8CB5003E6F65 /* STViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
|
||||
<true/>
|
||||
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#import "STAppDelegate.h"
|
||||
|
||||
#import "STViewController.h"
|
||||
|
||||
@implementation STAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
@@ -15,6 +17,10 @@
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
// Override point for customization after application launch.
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
STViewController *controller = [[STViewController alloc] init];
|
||||
self.window.rootViewController = controller;
|
||||
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
14
STTweetLabel/STLinkProtocol.h
Normal file
14
STTweetLabel/STLinkProtocol.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// TXTweetCellProtocol.h
|
||||
// TweeXor
|
||||
//
|
||||
// Created by Sebastien Thiebaud on 12/15/12.
|
||||
// Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
|
||||
//
|
||||
|
||||
@protocol STLinkProtocol <NSObject>
|
||||
|
||||
@required
|
||||
- (void)tweetLinkClicked:(NSString *)link;
|
||||
|
||||
@end
|
||||
26
STTweetLabel/STTweetLabel.h
Normal file
26
STTweetLabel/STTweetLabel.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// TXTweetLabel.h
|
||||
// TweeXor
|
||||
//
|
||||
// Created by Sebastien Thiebaud on 12/14/12.
|
||||
// Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "STLinkProtocol.h"
|
||||
|
||||
@interface STTweetLabel : UILabel
|
||||
{
|
||||
NSMutableArray *touchLocations;
|
||||
NSMutableArray *touchWords;
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) UIFont *fontLink;
|
||||
@property (nonatomic, strong) UIFont *fontHashtag;
|
||||
@property (nonatomic, strong) UIColor *colorLink;
|
||||
@property (nonatomic, strong) UIColor *colorHashtag;
|
||||
|
||||
@property (nonatomic, strong) id delegate;
|
||||
|
||||
@end
|
||||
148
STTweetLabel/STTweetLabel.m
Normal file
148
STTweetLabel/STTweetLabel.m
Normal file
@@ -0,0 +1,148 @@
|
||||
//
|
||||
// TXTweetLabel.m
|
||||
// TweeXor
|
||||
//
|
||||
// Created by Sebastien Thiebaud on 12/14/12.
|
||||
// Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "STTweetLabel.h"
|
||||
|
||||
@implementation STTweetLabel
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// Set the basic properties
|
||||
[self setBackgroundColor:[UIColor clearColor]];
|
||||
[self setUserInteractionEnabled:YES];
|
||||
[self setNumberOfLines:0];
|
||||
[self setLineBreakMode:NSLineBreakByWordWrapping];
|
||||
|
||||
// Alloc and init the arrays which stock the touchable words and their location
|
||||
touchLocations = [[NSMutableArray alloc] init];
|
||||
touchWords = [[NSMutableArray alloc] init];
|
||||
|
||||
// Init touchable words colors
|
||||
_colorHashtag = [UIColor colorWithWhite:170.0/255.0 alpha:1.0];
|
||||
_colorLink = [UIColor colorWithRed:129.0/255.0 green:171.0/255.0 blue:193.0/255.0 alpha:1.0];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)drawTextInRect:(CGRect)rect
|
||||
{
|
||||
_fontHashtag = self.font;
|
||||
_fontLink = self.font;
|
||||
|
||||
[touchLocations removeAllObjects];
|
||||
[touchWords removeAllObjects];
|
||||
|
||||
// Separate words by spaces and lines
|
||||
NSArray *words = [[self htmlToText:self.text] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
|
||||
// Init a point which is the reference to draw words
|
||||
CGPoint drawPoint = CGPointMake(0.0, 0.0);
|
||||
// Calculate the size of a space with the actual font
|
||||
CGSize sizeSpace = [@" " sizeWithFont:self.font constrainedToSize:rect.size lineBreakMode:self.lineBreakMode];
|
||||
|
||||
[self.textColor set];
|
||||
|
||||
for (NSString *word in words)
|
||||
{
|
||||
CGSize sizeWord = [word sizeWithFont:self.font];
|
||||
|
||||
// Test if the new word must be in a new line
|
||||
if (drawPoint.x + sizeWord.width > rect.size.width)
|
||||
{
|
||||
drawPoint = CGPointMake(0.0, drawPoint.y + sizeWord.height);
|
||||
}
|
||||
|
||||
// Regex to catch @mention #hashtag and link http(s)://
|
||||
NSError *error;
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"((@|#)([A-Z0-9a-z(é|è|à|á|ù)_]+))|(http(s)?://([A-Z0-9a-z._-]*(/)?)*)" options:NSRegularExpressionCaseInsensitive error:&error];
|
||||
|
||||
NSTextCheckingResult *match = [regex firstMatchInString:word options:0 range:NSMakeRange(0, [word length])];
|
||||
|
||||
// Dissolve the word (for example a hashtag: #youtube!, we want only #youtube)
|
||||
NSString *preCharacters = [word substringToIndex:match.range.location];
|
||||
NSString *wordCharacters = [word substringWithRange:match.range];
|
||||
NSString *postCharacters = [word substringFromIndex:match.range.location + match.range.length];
|
||||
|
||||
// Draw the prefix of the word (if it has a prefix)
|
||||
if (![preCharacters isEqualToString:@""])
|
||||
{
|
||||
[self.textColor set];
|
||||
CGSize sizePreCharacters = [preCharacters sizeWithFont:self.font];
|
||||
[preCharacters drawAtPoint:drawPoint withFont:self.font];
|
||||
drawPoint = CGPointMake(drawPoint.x + sizePreCharacters.width, drawPoint.y);
|
||||
}
|
||||
|
||||
// Draw the touchable word
|
||||
if (![wordCharacters isEqualToString:@""])
|
||||
{
|
||||
// Set the color for mention/hashtag OR weblink
|
||||
if ([wordCharacters hasPrefix:@"#"] || [wordCharacters hasPrefix:@"@"])
|
||||
{
|
||||
[_colorHashtag set];
|
||||
}
|
||||
else if ([wordCharacters hasPrefix:@"http"])
|
||||
{
|
||||
[_colorLink set];
|
||||
}
|
||||
|
||||
CGSize sizeWordCharacters = [wordCharacters sizeWithFont:self.font];
|
||||
[wordCharacters drawAtPoint:drawPoint withFont:self.font];
|
||||
|
||||
// Stock the touchable zone
|
||||
[touchWords addObject:wordCharacters];
|
||||
[touchLocations addObject:[NSValue valueWithCGRect:CGRectMake(drawPoint.x, drawPoint.y, sizeWordCharacters.width, sizeWordCharacters.height)]];
|
||||
|
||||
drawPoint = CGPointMake(drawPoint.x + sizeWordCharacters.width, drawPoint.y);
|
||||
}
|
||||
|
||||
// Draw the suffix of the word (if it has a suffix) else the word no-touchable
|
||||
if (![postCharacters isEqualToString:@""])
|
||||
{
|
||||
[self.textColor set];
|
||||
CGSize sizePostCharacters = [postCharacters sizeWithFont:self.font];
|
||||
[postCharacters drawAtPoint:drawPoint withFont:self.font];
|
||||
drawPoint = CGPointMake(drawPoint.x + sizePostCharacters.width, drawPoint.y);
|
||||
}
|
||||
|
||||
drawPoint = CGPointMake(drawPoint.x + sizeSpace.width, drawPoint.y);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
UITouch *touch = event.allTouches.anyObject;
|
||||
CGPoint touchPoint = [touch locationInView:self];
|
||||
|
||||
[touchLocations enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
CGRect touchZone = [obj CGRectValue];
|
||||
|
||||
// If a touchable word is found
|
||||
if (CGRectContainsPoint(touchZone, touchPoint) && [_delegate respondsToSelector:@selector(tweetLinkClicked:)])
|
||||
{
|
||||
[_delegate tweetLinkClicked:[touchWords objectAtIndex:idx]];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSString *)htmlToText:(NSString *)htmlString
|
||||
{
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@"&" withString:@"&"];
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@">" withString:@">"];
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@""" withString:@""""];
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@"'" withString:@"'"];
|
||||
|
||||
// Extras
|
||||
htmlString = [htmlString stringByReplacingOccurrencesOfString:@"<3" withString:@"♥"];
|
||||
|
||||
return htmlString;
|
||||
}
|
||||
|
||||
@end
|
||||
19
STTweetLabel/STViewController.h
Normal file
19
STTweetLabel/STViewController.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// STViewController.h
|
||||
// STTweetLabel
|
||||
//
|
||||
// Created by Sebastien Thiebaud on 12/15/12.
|
||||
// Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "STLinkProtocol.h"
|
||||
|
||||
@class STTweetLabel;
|
||||
@interface STViewController : UIViewController <STLinkProtocol>
|
||||
|
||||
@property (strong, nonatomic) STTweetLabel *tweetLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *displayLabel;
|
||||
|
||||
@end
|
||||
55
STTweetLabel/STViewController.m
Normal file
55
STTweetLabel/STViewController.m
Normal file
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// STViewController.m
|
||||
// STTweetLabel
|
||||
//
|
||||
// Created by Sebastien Thiebaud on 12/15/12.
|
||||
// Copyright (c) 2012 Sebastien Thiebaud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "STViewController.h"
|
||||
|
||||
#import "STTweetLabel.h"
|
||||
|
||||
@interface STViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation STViewController
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
|
||||
_tweetLabel = [[STTweetLabel alloc] initWithFrame:CGRectMake(20.0, 60.0, 280.0, 200.0)];
|
||||
|
||||
[_tweetLabel setFont:[UIFont fontWithName:@"HelveticaNeue" size:17.0]];
|
||||
[_tweetLabel setTextColor:[UIColor blackColor]];
|
||||
[_tweetLabel setDelegate:self];
|
||||
[_tweetLabel setText:@"Hi. This is a new tool for @you! Developed by->@SebThiebaud for #iPhone #ObjC... ;-) My GitHub page: https://t.co/pQXDoiYA"];
|
||||
[self.view addSubview:_tweetLabel];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark STLink Protocol
|
||||
|
||||
- (void)tweetLinkClicked:(NSString *)link
|
||||
{
|
||||
[_displayLabel setText:link];
|
||||
}
|
||||
|
||||
@end
|
||||
393
STTweetLabel/STViewController.xib
Normal file
393
STTweetLabel/STViewController.xib
Normal file
@@ -0,0 +1,393 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1536</int>
|
||||
<string key="IBDocument.SystemVersion">12C3006</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.34</string>
|
||||
<string key="IBDocument.HIToolboxVersion">625.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1930</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBNSLayoutConstraint</string>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUILabel" id="375607431">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 20}, {163, 21}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Example (try to click):</string>
|
||||
<object class="NSColor" key="IBUITextColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
|
||||
</object>
|
||||
<nil key="IBUIHighlightedColor"/>
|
||||
<int key="IBUIBaselineAdjustment">0</int>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<double key="pointSize">17</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">17</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
||||
</object>
|
||||
<object class="IBUILabel" id="687220775">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 228}, {280, 45}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText"/>
|
||||
<object class="NSColor" key="IBUITextColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4yMzM4NDAwMjM2IDAuMDY4MTQzNTY2MzUgMC41Mjc2NjIxOTQzAA</bytes>
|
||||
</object>
|
||||
<nil key="IBUIHighlightedColor"/>
|
||||
<int key="IBUIBaselineAdjustment">0</int>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<double key="pointSize">20</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">20</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="375607431"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
|
||||
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
|
||||
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="dict.sortedKeys">
|
||||
<integer value="1"/>
|
||||
<integer value="3"/>
|
||||
</array>
|
||||
<array key="dict.values">
|
||||
<string>{320, 568}</string>
|
||||
<string>{568, 320}</string>
|
||||
</array>
|
||||
</object>
|
||||
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
|
||||
<int key="IBUIType">2</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">displayLabel</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="687220775"/>
|
||||
</object>
|
||||
<int key="connectionID">30</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<object class="IBNSLayoutConstraint" id="400308954">
|
||||
<reference key="firstItem" ref="687220775"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">3</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">228</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">3</int>
|
||||
<float key="scoringTypeFloat">9</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="1025645493">
|
||||
<reference key="firstItem" ref="191373211"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="687220775"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="818625100">
|
||||
<reference key="firstItem" ref="687220775"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">5</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="177240085">
|
||||
<reference key="firstItem" ref="375607431"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">5</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="758711877">
|
||||
<reference key="firstItem" ref="375607431"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">3</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">20</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<reference ref="375607431"/>
|
||||
<reference ref="687220775"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="375607431"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="758711877"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="177240085"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">21</int>
|
||||
<reference key="object" ref="687220775"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<object class="IBNSLayoutConstraint" id="195910942">
|
||||
<reference key="firstItem" ref="687220775"/>
|
||||
<int key="firstAttribute">8</int>
|
||||
<int key="relation">0</int>
|
||||
<nil key="secondItem"/>
|
||||
<int key="secondAttribute">0</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">45</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="687220775"/>
|
||||
<int key="scoringType">3</int>
|
||||
<float key="scoringTypeFloat">9</float>
|
||||
<int key="contentType">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">25</int>
|
||||
<reference key="object" ref="818625100"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">26</int>
|
||||
<reference key="object" ref="1025645493"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">28</int>
|
||||
<reference key="object" ref="195910942"/>
|
||||
<reference key="parent" ref="687220775"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">32</int>
|
||||
<reference key="object" ref="400308954"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">STViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<array class="NSMutableArray" key="1.IBViewMetadataConstraints">
|
||||
<reference ref="758711877"/>
|
||||
<reference ref="177240085"/>
|
||||
<reference ref="818625100"/>
|
||||
<reference ref="1025645493"/>
|
||||
<reference ref="400308954"/>
|
||||
</array>
|
||||
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<array class="NSMutableArray" key="21.IBViewMetadataConstraints">
|
||||
<reference ref="195910942"/>
|
||||
</array>
|
||||
<boolean value="NO" key="21.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<boolean value="NO" key="4.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">32</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSLayoutConstraint</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">STViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">displayLabel</string>
|
||||
<string key="NS.object.0">UILabel</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">displayLabel</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">displayLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/STViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<bool key="IBDocument.UseAutolayout">YES</bool>
|
||||
<string key="IBCocoaTouchPluginVersion">1930</string>
|
||||
</data>
|
||||
</archive>
|
||||
Reference in New Issue
Block a user