Permalink
Browse files

Added a AKOMultiColumnTextViewDataSource protocol, which makes it eas…

…y to add views in the columns of the text; thanks to Christian Menschel from tapwork.de for the contribution!
  • Loading branch information...
1 parent 6f1160f commit 9378ecd99f5bb09cf5dab5b7775022ddbd2c4f65 Adrian Kosmaczewski committed Jul 7, 2011
View
4 Classes/Controllers/PageController.h
@@ -7,11 +7,13 @@
//
#import <UIKit/UIKit.h>
+#import "AKOMultiColumnTextViewDataSource.h"
+
@class AKOMultiPageTextView;
@class AKOCustomFontLabel;
-@interface PageController : UIViewController
+@interface PageController : UIViewController <AKOMultiColumnTextViewDataSource>
{
@private
AKOMultiPageTextView *_multiPageView;
View
21 Classes/Controllers/PageController.m
@@ -47,15 +47,30 @@ - (void)viewDidLoad
self.fontSize = 24.0;
+
+ self.multiPageView.dataSource = self;
+ self.multiPageView.columnInset = CGPointMake(50, 30);
self.multiPageView.text = [NSString stringFromFileNamed:@"lorem_ipsum.txt"];
self.multiPageView.font = [UIFont fontWithName:@"Georgia" size:self.fontSize];
- self.multiPageView.columnCount = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? 3 : 4;
+ self.multiPageView.columnCount = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? 2 : 3;
UIPinchGestureRecognizer *pinchRecognizer = [[[UIPinchGestureRecognizer alloc] initWithTarget:self
action:@selector(changeTextSize:)] autorelease];
[self.multiPageView addGestureRecognizer:pinchRecognizer];
}
+- (UIView*)akoMultiColumnTextView:(AKOMultiColumnTextView*)textView viewForColumn:(NSInteger)column onPage:(NSInteger)page
+{
+ if (page == 0 && column == 1)
+ {
+ UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 200)] autorelease];
+ view.backgroundColor = [UIColor redColor];
+ return view;
+ }
+
+ return nil;
+}
+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
@@ -71,11 +86,11 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interf
{
if (UIInterfaceOrientationIsPortrait(interfaceOrientation))
{
- self.multiPageView.columnCount = 3;
+ self.multiPageView.columnCount = 2;
}
else
{
- self.multiPageView.columnCount = 4;
+ self.multiPageView.columnCount = 3;
}
[self.multiPageView setNeedsDisplay];
[self.label setNeedsDisplay];
View
20 Classes/Helpers/AKOMultiColumnTextViewDataSource.h
@@ -0,0 +1,20 @@
+//
+// AKOMultiColumnTextViewDataSource.h
+// CoreTextWrapper
+//
+// Created by Christian Menschel on 12.05.11.
+// Copyright 2011 akosma software. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@class AKOMultiColumnTextView;
+
+@protocol AKOMultiColumnTextViewDataSource <NSObject>
+
+@optional
+
+- (UIView*)akoMultiColumnTextView:(AKOMultiColumnTextView*)textView viewForColumn:(NSInteger)column onPage:(NSInteger)page;
+
+
+@end
View
24 Classes/Views/AKOMultiColumnTextView.h
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import <CoreText/CoreText.h>
+#import "AKOMultiColumnTextViewDataSource.h"
@interface AKOMultiColumnTextView : UIView
{
@@ -22,6 +23,17 @@
CFIndex _startIndex;
CFIndex _finalIndex;
BOOL _moreTextAvailable;
+
+ CTLineBreakMode _lineBreakMode;
+ CTTextAlignment _textAlignment;
+ CGFloat _firstLineHeadIndent;
+ CGFloat _spacing;
+ CGFloat _topSpacing;
+ CGFloat _lineSpacing;
+ CGPoint _columnInset;
+
+ NSInteger _page;
+ id <AKOMultiColumnTextViewDataSource> _dataSource;
}
@property (nonatomic) NSInteger columnCount;
@@ -32,4 +44,16 @@
@property (nonatomic, readonly) CFIndex finalIndex;
@property (nonatomic, readonly) BOOL moreTextAvailable;
+@property (nonatomic, assign) CTLineBreakMode lineBreakMode;
+@property (nonatomic, assign) CTTextAlignment textAlignment;
+@property (nonatomic, assign) CGFloat firstLineHeadIndent;
+@property (nonatomic, assign) CGFloat spacing;
+@property (nonatomic, assign) CGFloat topSpacing;
+@property (nonatomic, assign) CGFloat lineSpacing;
+@property (nonatomic, assign) CGPoint columnInset;
+
+@property (nonatomic, assign) id <AKOMultiColumnTextViewDataSource> dataSource;
+
@end
+
+
View
136 Classes/Views/AKOMultiColumnTextView.m
@@ -1,4 +1,4 @@
-//
+
// AKOMultiColumnTextView.m
// CoreTextWrapper
//
@@ -17,7 +17,7 @@ - (void)updateAttributedString;
- (void)updateFrames;
- (void)setup;
- (void)createColumns;
-
+- (void)setPage:(NSInteger)page;
@end
@@ -32,6 +32,16 @@ @implementation AKOMultiColumnTextView
@synthesize moreTextAvailable = _moreTextAvailable;
@synthesize attributedString = _attributedString;
+@synthesize lineBreakMode = _lineBreakMode;
+@synthesize textAlignment = _textAlignment;
+@synthesize firstLineHeadIndent = _firstLineHeadIndent;
+@synthesize spacing = _spacing;
+@synthesize topSpacing = _topSpacing;
+@synthesize lineSpacing = _lineSpacing;
+@synthesize columnInset = _columnInset;
+
+@synthesize dataSource = _dataSource;
+
#pragma mark -
#pragma mark Init and dealloc
@@ -47,11 +57,20 @@ - (void)setup
_moreTextAvailable = NO;
_columnPaths = NULL;
_frames = NULL;
+
+
+ _lineBreakMode = kCTLineBreakByWordWrapping;
+ _textAlignment = kCTLeftTextAlignment;
+ _firstLineHeadIndent = 0.0;
+ _spacing = 5.0;
+ _topSpacing = 3.0;
+ _lineSpacing = 1.0;
+ _columnInset = CGPointMake(10.0, 10.0);
}
- (id)initWithFrame:(CGRect)frame
{
- if (self = [super initWithFrame:frame])
+ if ((self = [super initWithFrame:frame]))
{
[self setup];
}
@@ -60,7 +79,7 @@ - (id)initWithFrame:(CGRect)frame
- (id)initWithCoder:(NSCoder *)aDecoder
{
- if (self = [super initWithCoder:aDecoder])
+ if ((self = [super initWithCoder:aDecoder]))
{
[self setup];
}
@@ -79,6 +98,7 @@ - (void)dealloc
CFRelease(_frames);
}
+ self.dataSource = nil;
self.attributedString = nil;
[_text release];
@@ -127,6 +147,19 @@ - (NSString *)text
return _text;
}
+- (void)setDataSource:(id<AKOMultiColumnTextViewDataSource>)dataSource
+{
+ if (![_dataSource isEqual:dataSource])
+ {
+ _dataSource = dataSource;
+ if (dataSource != nil)
+ {
+ [self updateFrames];
+ [self setNeedsDisplay];
+ }
+ }
+}
+
- (void)setText:(NSString *)newText
{
if (![_text isEqualToString:newText])
@@ -155,6 +188,8 @@ - (void)setColumnCount:(NSInteger)newColumnCount
}
}
+
+
#pragma mark -
#pragma mark Drawing methods
@@ -183,6 +218,7 @@ - (void)drawRect:(CGRect)rect
- (void)createColumns
{
+
int column;
CGRect* columnRects = (CGRect*)calloc(_columnCount, sizeof(*columnRects));
@@ -203,7 +239,7 @@ - (void)createColumns
// Inset all columns by a few pixels of margin.
for (column = 0; column < _columnCount; column++)
{
- columnRects[column] = CGRectInset(columnRects[column], 10.0, 10.0);
+ columnRects[column] = CGRectInset(columnRects[column], _columnInset.x, _columnInset.y);
}
// Create an array of layout paths, one for each column.
@@ -215,11 +251,75 @@ - (void)createColumns
for (column = 0; column < _columnCount; column++)
{
CGMutablePathRef path = CGPathCreateMutable();
- CGPathAddRect(path, NULL, columnRects[column]);
+
+
+ // ask the delegate here
+ UIView *columnView = nil;
+ if ([self.dataSource respondsToSelector:@selector(akoMultiColumnTextView:viewForColumn:onPage:)])
+ {
+ columnView = [self.dataSource akoMultiColumnTextView:self viewForColumn:column onPage:_page];
+ }
+ if (columnView != nil)
+ {
+ CGRect columnRect = columnRects[column];
+ CGRect rectFromView = columnView.frame;
+ CGFloat cutLine = 0;
+ CGFloat drawYOffset = 0;
+ BOOL drawAbove = YES;
+
+
+ if (rectFromView.origin.y < 0)
+ {
+ cutLine = rectFromView.origin.y+rectFromView.size.height + _columnInset.y;
+ }
+ else if (rectFromView.origin.y+rectFromView.size.height >= columnRect.size.height)
+ {
+ cutLine = columnRect.size.height-(columnRect.size.height - rectFromView.origin.y) - _columnInset.y;
+ drawAbove = NO;
+ drawYOffset = columnRect.size.height-cutLine + _columnInset.y;
+ }
+ else
+ {
+ cutLine = rectFromView.size.height+_columnInset.y;
+ }
+
+ CGRect rectToDraw1;
+ CGRect rectToDraw2;
+ CGRectDivide(columnRect,
+ &rectToDraw1,
+ &rectToDraw2,
+ cutLine,
+ CGRectMinYEdge);
+
+
+
+ CGRect drawRect = rectToDraw1;
+ if (drawAbove == YES)
+ {
+ drawRect = rectToDraw2;
+ }
+
+ CGPathAddRect(path, NULL, CGRectMake(drawRect.origin.x,drawYOffset +_columnInset.y, drawRect.size.width, drawRect.size.height-_columnInset.y));
+
+ // Not add the desired view on the column
+ columnView.frame = CGRectMake(drawRect.origin.x,
+ columnView.frame.origin.y + _columnInset.y,
+ columnView.frame.size.width,
+ columnView.frame.size.height);
+
+ [self addSubview:columnView];
+ }
+ else
+ {
+ CGPathAddRect(path, NULL, columnRects[column]);
+ }
+
CFArrayInsertValueAtIndex(_columnPaths, column, path);
CFRelease(path);
}
free(columnRects);
+
+
}
- (void)updateAttributedString
@@ -245,21 +345,16 @@ - (void)updateAttributedString
range:range];
}
+
CFIndex theNumberOfSettings = 6;
- CTLineBreakMode lineBreakMode = kCTLineBreakByWordWrapping;
- CTTextAlignment textAlignment = kCTLeftTextAlignment;
- CGFloat indent = 10.0;
- CGFloat spacing = 15.0;
- CGFloat topSpacing = 5.0;
- CGFloat lineSpacing = 1.0;
CTParagraphStyleSetting theSettings[6] =
{
- { kCTParagraphStyleSpecifierAlignment, sizeof(CTTextAlignment), &textAlignment },
- { kCTParagraphStyleSpecifierLineBreakMode, sizeof(CTLineBreakMode), &lineBreakMode },
- { kCTParagraphStyleSpecifierFirstLineHeadIndent, sizeof(CGFloat), &indent },
- { kCTParagraphStyleSpecifierParagraphSpacing, sizeof(CGFloat), &spacing },
- { kCTParagraphStyleSpecifierParagraphSpacingBefore, sizeof(CGFloat), &topSpacing },
- { kCTParagraphStyleSpecifierLineSpacing, sizeof(CGFloat), &lineSpacing }
+ { kCTParagraphStyleSpecifierAlignment, sizeof(CTTextAlignment), &_textAlignment },
+ { kCTParagraphStyleSpecifierLineBreakMode, sizeof(CTLineBreakMode), &_lineBreakMode },
+ { kCTParagraphStyleSpecifierFirstLineHeadIndent, sizeof(CGFloat), &_firstLineHeadIndent },
+ { kCTParagraphStyleSpecifierParagraphSpacing, sizeof(CGFloat), &_spacing },
+ { kCTParagraphStyleSpecifierParagraphSpacingBefore, sizeof(CGFloat), &_topSpacing },
+ { kCTParagraphStyleSpecifierLineSpacing, sizeof(CGFloat), &_lineSpacing }
};
CTParagraphStyleRef paragraphStyle = CTParagraphStyleCreate(theSettings, theNumberOfSettings);
@@ -306,4 +401,9 @@ - (void)updateFrames
}
}
+- (void)setPage:(NSInteger)page
+{
+ _page = page;
+}
+
@end
View
27 Classes/Views/AKOMultiPageTextView.h
@@ -7,6 +7,8 @@
//
#import <UIKit/UIKit.h>
+#import "AKOMultiColumnTextViewDataSource.h"
+#import <CoreText/CoreText.h>
@interface AKOMultiPageTextView : UIView <UIScrollViewDelegate>
{
@@ -19,11 +21,36 @@
NSInteger _columnCount;
UIPageControl *_pageControl;
BOOL _pageControlUsed;
+ BOOL _scrollEnabled;
+
+ CTLineBreakMode _lineBreakMode;
+ CTTextAlignment _textAlignment;
+ CGFloat _firstLineHeadIndent;
+ CGFloat _spacing;
+ CGFloat _topSpacing;
+ CGFloat _lineSpacing;
+ CGPoint _columnInset;
+
+ id <AKOMultiColumnTextViewDataSource> _dataSource;
}
@property (nonatomic, copy) NSString *text;
@property (nonatomic, retain) UIFont *font;
@property (nonatomic, retain) UIColor *color;
@property (nonatomic) NSInteger columnCount;
+@property (nonatomic, assign) BOOL scrollEnabled;
+@property (nonatomic, assign, getter=getCurrentPageIndex) NSInteger currentPageIndex;
+@property (nonatomic, assign, getter=getLastPageIndex) NSInteger lastPageIndex;
+
+@property (nonatomic, retain) UIPageControl *pageControl;
+@property (nonatomic, assign) CTLineBreakMode lineBreakMode;
+@property (nonatomic, assign) CTTextAlignment textAlignment;
+@property (nonatomic, assign) CGFloat firstLineHeadIndent;
+@property (nonatomic, assign) CGFloat spacing;
+@property (nonatomic, assign) CGFloat topSpacing;
+@property (nonatomic, assign) CGFloat lineSpacing;
+@property (nonatomic, assign) CGPoint columnInset;
+
+@property (nonatomic, assign) id <AKOMultiColumnTextViewDataSource> dataSource;
@end
View
134 Classes/Views/AKOMultiPageTextView.m
@@ -9,15 +9,20 @@
#import "AKOMultiPageTextView.h"
#import "AKOMultiColumnTextView.h"
+
+@interface AKOMultiColumnTextView ()
+- (void)setPage:(NSInteger)page;
+@end
+
@interface AKOMultiPageTextView ()
-@property (nonatomic, retain) UIPageControl *pageControl;
+
@property (nonatomic, retain) NSMutableArray *pages;
@property (nonatomic, retain) UIScrollView *scrollView;
@property (nonatomic) BOOL pageControlUsed;
- (void)setup;
-
+- (void)changeColorForPageControl;
@end
@@ -27,14 +32,31 @@ @implementation AKOMultiPageTextView
@synthesize scrollView = _scrollView;
@synthesize pageControl = _pageControl;
@synthesize pageControlUsed = _pageControlUsed;
+@synthesize dataSource = _dataSource;
+@synthesize scrollEnabled = _scrollEnabled;
+
+@synthesize lineBreakMode = _lineBreakMode;
+@synthesize textAlignment = _textAlignment;
+@synthesize firstLineHeadIndent = _firstLineHeadIndent;
+@synthesize spacing = _spacing;
+@synthesize topSpacing = _topSpacing;
+@synthesize lineSpacing = _lineSpacing;
+@synthesize columnInset = _columnInset;
+
+
+@synthesize currentPageIndex;
+@synthesize lastPageIndex;
+
@dynamic text;
@dynamic font;
@dynamic columnCount;
@dynamic color;
+
+
- (id)initWithCoder:(NSCoder *)aDecoder
{
- if (self = [super initWithCoder:aDecoder])
+ if ((self = [super initWithCoder:aDecoder]))
{
[self setup];
}
@@ -43,7 +65,7 @@ - (id)initWithCoder:(NSCoder *)aDecoder
- (id)initWithFrame:(CGRect)frame
{
- if (self = [super initWithFrame:frame])
+ if ((self = [super initWithFrame:frame]))
{
[self setup];
}
@@ -52,22 +74,36 @@ - (id)initWithFrame:(CGRect)frame
- (void)setup
{
+ _lineBreakMode = kCTLineBreakByWordWrapping;
+ _textAlignment = kCTLeftTextAlignment;
+ _firstLineHeadIndent = 0.0;
+ _spacing = 5.0;
+ _topSpacing = 0.0;
+ _lineSpacing = 1.0;
+ _columnCount = 2;
+ _columnInset = CGPointMake(10.0, 10.0);
+ _scrollEnabled = YES;
+
self.pages = [NSMutableArray arrayWithCapacity:5];
CGRect scrollViewFrame = CGRectMake(0.0, 0.0, self.frame.size.width, self.frame.size.height - 20.0);
self.scrollView = [[[UIScrollView alloc] initWithFrame:scrollViewFrame] autorelease];
- self.scrollView.scrollEnabled = YES;
+ self.scrollView.scrollEnabled = self.scrollEnabled;
self.scrollView.bounces = YES;
self.scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.scrollView.pagingEnabled = YES;
self.scrollView.delegate = self;
+
CGRect pageControlFrame = CGRectMake(0.0, self.frame.size.height - 20.0, self.frame.size.width, 20.0);
self.pageControl = [[[UIPageControl alloc] initWithFrame:pageControlFrame] autorelease];
self.pageControl.numberOfPages = 2;
- self.pageControl.backgroundColor = [UIColor whiteColor];
+ self.pageControl.backgroundColor = [UIColor clearColor];
self.pageControl.currentPage = 0;
- self.pageControl.backgroundColor = [UIColor lightGrayColor];
+ self.pageControl.hidden = NO;
+
+ [self changeColorForPageControl];
+
[self.pageControl addTarget:self
action:@selector(changePage:)
forControlEvents:UIControlEventValueChanged];
@@ -81,7 +117,9 @@ - (void)dealloc
self.pageControl = nil;
self.scrollView = nil;
self.pages = nil;
-
+ self.dataSource = nil;
+
+
[_text release];
_text = nil;
[_font release];
@@ -95,8 +133,12 @@ - (void)dealloc
#pragma mark -
#pragma mark UIScrollViewDelegate methods
+
+
- (void)scrollViewDidScroll:(UIScrollView *)sender
{
+ [self changeColorForPageControl];
+
if (self.pageControlUsed)
{
return;
@@ -105,6 +147,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)sender
CGFloat pageWidth = self.scrollView.frame.size.width;
int page = floor((self.scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
self.pageControl.currentPage = page;
+
}
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
@@ -117,18 +160,39 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
self.pageControlUsed = NO;
}
+- (void)changeColorForPageControl
+{
+ for (NSUInteger subviewIndex = 0; subviewIndex < [self.pageControl.subviews count]; subviewIndex++)
+ {
+ UIImageView* subview = [self.pageControl.subviews objectAtIndex:subviewIndex];
+ if (subviewIndex == self.pageControl.currentPage)
+ {
+ if ([subview respondsToSelector:@selector(setImage:)])
+ {
+ [subview setImage:[UIImage imageNamed:@"page_dot_active.png"]];
+ }
+ }
+ else
+ {
+ if ([subview respondsToSelector:@selector(setImage:)])
+ {
+ [subview setImage:[UIImage imageNamed:@"page_dot_inactive.png"]];
+ }
+ }
+
+ }
+}
+
#pragma mark -
#pragma mark IBAction methods
- (IBAction)changePage:(id)sender
{
int page = self.pageControl.currentPage;
-
CGRect frame = self.scrollView.frame;
frame.origin.x = frame.size.width * page;
frame.origin.y = 0;
[self.scrollView scrollRectToVisible:frame animated:YES];
-
self.pageControlUsed = YES;
}
@@ -194,6 +258,36 @@ - (void)setColor:(UIColor *)newColor
}
}
+
+- (void)setDataSource:(id<AKOMultiColumnTextViewDataSource>)dataSource
+{
+ if (![_dataSource isEqual:dataSource])
+ {
+ _dataSource = dataSource;
+ if (dataSource != nil)
+ {
+ [self setNeedsDisplay];
+ }
+ }
+}
+
+
+- (void)setScrollEnabled:(BOOL)scrollEnabled
+{
+ _scrollEnabled = scrollEnabled;
+ self.scrollView.scrollEnabled = scrollEnabled;
+}
+
+- (NSInteger)getCurrentPageIndex
+{
+ return self.pageControl.currentPage;
+}
+
+- (NSInteger)getLastPageIndex
+{
+ return [_pages count]-1;
+}
+
#pragma mark -
#pragma mark Drawing code
@@ -212,13 +306,26 @@ - (void)drawRect:(CGRect)rect
{
CGRect currentFrame = CGRectOffset(self.scrollView.frame, self.scrollView.frame.size.width * iteration, 0.0);
AKOMultiColumnTextView *view = [[[AKOMultiColumnTextView alloc] initWithFrame:currentFrame] autorelease];
+ [view setPage:iteration];
+ view.columnCount = self.columnCount;
view.startIndex = currentPosition;
view.text = self.text;
view.font = self.font;
- view.columnCount = self.columnCount;
view.color = self.color;
-
+ view.backgroundColor = self.backgroundColor;
+
+ // set the properties
+ view.lineBreakMode = _lineBreakMode;
+ view.textAlignment = _textAlignment;
+ view.firstLineHeadIndent = _firstLineHeadIndent;
+ view.spacing = _spacing;
+ view.topSpacing = _topSpacing;
+ view.lineSpacing = _lineSpacing;
+ view.columnInset = _columnInset;
+
+ view.dataSource = self.dataSource;
+
[self.pages addObject:view];
[self.scrollView addSubview:view];
@@ -231,6 +338,9 @@ - (void)drawRect:(CGRect)rect
while (moreTextAvailable);
self.pageControl.numberOfPages = iteration;
self.pageControl.currentPage = 0;
+
+ [self changeColorForPageControl];
+
}
@end
View
2 CoreTextWrapper.xcodeproj/project.pbxproj
@@ -53,6 +53,7 @@
3ACEB3A711E5D104005316CD /* PageController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PageController.xib; sourceTree = "<group>"; };
3ACEB3A911E5D112005316CD /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* CoreTextWrapper-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "CoreTextWrapper-Info.plist"; path = "../CoreTextWrapper-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+ DAEE4FDB137C68EB0054D8F6 /* AKOMultiColumnTextViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AKOMultiColumnTextViewDataSource.h; path = Classes/Helpers/AKOMultiColumnTextViewDataSource.h; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -196,6 +197,7 @@
3ACEB39011E5CFD4005316CD /* AKOMultiColumnTextView.m */,
3ACEB39111E5CFD4005316CD /* AKOMultiPageTextView.h */,
3ACEB39211E5CFD4005316CD /* AKOMultiPageTextView.m */,
+ DAEE4FDB137C68EB0054D8F6 /* AKOMultiColumnTextViewDataSource.h */,
);
path = Views;
sourceTree = "<group>";
View
234 Resources/NIBs/PageController.xib
@@ -2,17 +2,18 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">800</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.SystemVersion">10J3250</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
+ <string key="NS.object.0">301</string>
</object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -23,9 +24,7 @@
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.values" ref="0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -47,6 +46,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 96}, {1024, 652}}</string>
<reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor" id="50803128">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@@ -58,6 +58,7 @@
<int key="NSvFlags">293</int>
<string key="NSFrame">{{312, 20}, {402, 68}}</string>
<reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@@ -68,14 +69,16 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</object>
- <string key="NSFrameSize">{1024, 748}</string>
+ <string key="NSFrame">{{0, 20}, {1024, 748}}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="IBUIBackgroundColor" ref="50803128"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="IBUIInterfaceOrientation">3</int>
<int key="interfaceOrientation">3</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -182,17 +185,13 @@
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">9</int>
@@ -205,15 +204,15 @@
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Classes/Views/AKOCustomFontLabel.h</string>
+ <string key="minorKey">./Classes/AKOCustomFontLabel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">AKOMultiPageTextView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Classes/Views/AKOMultiPageTextView.h</string>
+ <string key="minorKey">./Classes/AKOMultiPageTextView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -253,201 +252,7 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Classes/Controllers/PageController.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="786211723">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIResponder</string>
- <string key="superclassName">NSObject</string>
- <reference key="sourceIdentifier" ref="786211723"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UISearchBar</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UISearchDisplayController</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIView</string>
- <string key="superclassName">UIResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <string key="superclassName">UIResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ <string key="minorKey">./Classes/PageController.h</string>
</object>
</object>
</object>
@@ -463,8 +268,7 @@
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../../CoreTextWrapper.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">117</string>
+ <string key="IBCocoaTouchPluginVersion">301</string>
</data>
</archive>

0 comments on commit 9378ecd

Please sign in to comment.