Converting feed detail actionsheet to popover. Fixing all ios 6 warnings.

This commit is contained in:
Samuel Clay 2012-10-12 13:58:26 -04:00
parent 0dadd59fcf
commit 1c7404de77
35 changed files with 4598 additions and 295 deletions

View file

@ -212,7 +212,7 @@
+ (NSError *)deflateErrorWithCode:(int)code
{
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of data failed with code %hi",code],NSLocalizedDescriptionKey,nil]];
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Compression of data failed with code %hi",(short)code],NSLocalizedDescriptionKey,nil]];
}
@synthesize streamReady;

View file

@ -211,7 +211,7 @@
+ (NSError *)inflateErrorWithCode:(int)code
{
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of data failed with code %hi",code],NSLocalizedDescriptionKey,nil]];
return [NSError errorWithDomain:NetworkRequestErrorDomain code:ASICompressionError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Decompression of data failed with code %hi",(short)code],NSLocalizedDescriptionKey,nil]];
}
@synthesize streamReady;

View file

@ -0,0 +1,23 @@
//
// FeedDetailMenuViewController.h
// NewsBlur
//
// Created by Samuel Clay on 10/10/12.
// Copyright (c) 2012 NewsBlur. All rights reserved.
//
#import <UIKit/UIKit.h>
@class NewsBlurAppDelegate;
@interface FeedDetailMenuViewController : UIViewController
<UITableViewDelegate,
UITableViewDataSource> {
NewsBlurAppDelegate *appDelegate;
}
@property (nonatomic, strong) NSArray *menuOptions;
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic) IBOutlet UITableView *menuTableView;
@end

View file

@ -0,0 +1,117 @@
//
// FeedDetailMenuViewController.m
// NewsBlur
//
// Created by Samuel Clay on 10/10/12.
// Copyright (c) 2012 NewsBlur. All rights reserved.
//
#import "FeedDetailMenuViewController.h"
#import "NewsBlurAppDelegate.h"
#import "MBProgressHUD.h"
#import "NBContainerViewController.h"
#import "FeedDetailViewController.h"
@implementation FeedDetailMenuViewController
@synthesize appDelegate;
@synthesize menuOptions;
@synthesize menuTableView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.menuOptions = [[NSArray alloc]
initWithObjects:@"Find Friends", @"Logout", nil];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
self.menuOptions = nil;
self.menuTableView = nil;
}
- (void)viewWillAppear:(BOOL)animated {
NSMutableArray *options = [NSMutableArray array];
// NSString *title = appDelegate.isRiverView ?
// appDelegate.activeFolder :
// [appDelegate.activeFeed objectForKey:@"feed_title"];
NSString *deleteText = [NSString stringWithFormat:@"Delete %@",
appDelegate.isRiverView ?
@"this entire folder" :
@"this site"];
[options addObject:deleteText];
[options addObject:@"Move to another folder"];
if (!appDelegate.isRiverView) {
[options addObject:@"Insta-fetch stories"];
}
self.menuOptions = options;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
#pragma mark -
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [self.menuOptions count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIndentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIndentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIndentifier];
}
cell.textLabel.text = [self.menuOptions objectAtIndex:[indexPath row]];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.row == 0) {
[appDelegate showFindFriends];
} if (indexPath.row == 1) {
[appDelegate confirmLogout];
}
// if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
// [appDelegate.masterContainerViewController hidePopover];
// } else {
// [appDelegate.feedDetailViewController.popoverController dismissPopoverAnimated:YES];
// appDelegate.feedDetailViewController.popoverController = nil;
// }
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
@end

View file

@ -7,9 +7,11 @@
//
#import <UIKit/UIKit.h>
#import "NewsBlurAppDelegate.h"
#import "ASIHTTPRequest.h"
#import "BaseViewController.h"
#import "Utilities.h"
#import "WEPopoverController.h"
@class NewsBlurAppDelegate;
@class FeedDetailTableCell;
@ -17,7 +19,8 @@
@interface FeedDetailViewController : BaseViewController
<UITableViewDelegate, UITableViewDataSource,
UIActionSheetDelegate, UIAlertViewDelegate,
UIPopoverControllerDelegate, ASIHTTPRequestDelegate> {
UIPopoverControllerDelegate, ASIHTTPRequestDelegate,
WEPopoverControllerDelegate> {
NewsBlurAppDelegate *appDelegate;
NSArray * stories;
@ -30,17 +33,18 @@
UISlider * feedScoreSlider;
UIBarButtonItem * feedMarkReadButton;
UISegmentedControl * intelligenceControl;
UIPopoverController *popoverController;
WEPopoverController *popoverController;
Class popoverClass;
}
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic) UIPopoverController *popoverController;
@property (nonatomic, strong) IBOutlet UITableView *storyTitlesTable;
@property (nonatomic) IBOutlet UIToolbar *feedViewToolbar;
@property (nonatomic) IBOutlet UISlider * feedScoreSlider;
@property (nonatomic) IBOutlet UIBarButtonItem * feedMarkReadButton;
@property (nonatomic) IBOutlet UIBarButtonItem * settingsButton;
@property (nonatomic) IBOutlet UISegmentedControl * intelligenceControl;
@property (nonatomic, retain) WEPopoverController *popoverController;
@property (nonatomic) NSArray * stories;
@property (nonatomic, readwrite) int feedPage;
@ -63,7 +67,7 @@
- (void)fadeSelectedCell;
- (IBAction)doOpenMarkReadActionSheet:(id)sender;
- (IBAction)doOpenSettingsActionSheet;
- (IBAction)doOpenSettingsActionSheet:(id)sender;
- (void)confirmDeleteSite;
- (void)deleteSite;
- (void)deleteFolder;

View file

@ -20,6 +20,8 @@
#import "JSON.h"
#import "StringHelper.h"
#import "Utilities.h"
#import "UIBarButtonItem+WEPopover.h"
#import "WEPopoverController.h"
#define kTableViewRowHeight 61;
@ -57,6 +59,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
popoverClass = [WEPopoverController class];
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
}
@ -159,6 +162,7 @@
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.popoverController dismissPopoverAnimated:YES];
self.popoverController = nil;
}
@ -954,48 +958,29 @@
actionSheet_ = nil;
}
- (IBAction)doOpenSettingsActionSheet {
// already displaying action sheet?
if (self.actionSheet_) {
[self.actionSheet_ dismissWithClickedButtonIndex:-1 animated:YES];
self.actionSheet_ = nil;
return;
}
NSString *title = appDelegate.isRiverView ?
appDelegate.activeFolder :
[appDelegate.activeFeed objectForKey:@"feed_title"];
UIActionSheet *options = [[UIActionSheet alloc]
initWithTitle:title
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
self.actionSheet_ = options;
NSString *deleteText = [NSString stringWithFormat:@"Delete %@",
appDelegate.isRiverView ?
@"this entire folder" :
@"this site"];
[options addButtonWithTitle:deleteText];
options.destructiveButtonIndex = 0;
NSString *moveText = @"Move to another folder";
[options addButtonWithTitle:moveText];
if (!appDelegate.isRiverView) {
NSString *fetchText = @"Insta-fetch stories";
[options addButtonWithTitle:fetchText];
}
options.cancelButtonIndex = [options addButtonWithTitle:@"Cancel"];
options.tag = kSettingsActionSheet;
- (IBAction)doOpenSettingsActionSheet:(id)sender {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[options showFromBarButtonItem:self.settingsButton animated:YES];
[appDelegate.masterContainerViewController showFeedDetailMenuPopover:sender];
} else {
[options showInView:self.view];
if (self.popoverController == nil) {
self.popoverController = [[WEPopoverController alloc]
initWithContentViewController:appDelegate.feedDetailMenuViewController];
self.popoverController.delegate = self;
} else {
[self.popoverController dismissPopoverAnimated:YES];
self.popoverController = nil;
}
if ([self.popoverController respondsToSelector:@selector(setContainerViewProperties:)]) {
[self.popoverController setContainerViewProperties:[self improvedContainerViewProperties]];
}
[self.popoverController setPopoverContentSize:CGSizeMake(200, 86)];
[self.popoverController presentPopoverFromBarButtonItem:self.settingsButton
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
}
}
- (void)confirmDeleteSite {
@ -1228,4 +1213,59 @@
NSLog(@"Error: %@", error);
}
#pragma mark -
#pragma mark WEPopoverControllerDelegate implementation
- (void)popoverControllerDidDismissPopover:(WEPopoverController *)thePopoverController {
//Safe to release the popover here
self.popoverController = nil;
}
- (BOOL)popoverControllerShouldDismissPopover:(WEPopoverController *)thePopoverController {
//The popover is automatically dismissed if you click outside it, unless you return NO here
return YES;
}
- (WEPopoverContainerViewProperties *)improvedContainerViewProperties {
WEPopoverContainerViewProperties *props = [WEPopoverContainerViewProperties alloc];
NSString *bgImageName = nil;
CGFloat bgMargin = 0.0;
CGFloat bgCapSize = 0.0;
CGFloat contentMargin = 5.0;
bgImageName = @"popoverBg.png";
// These constants are determined by the popoverBg.png image file and are image dependent
bgMargin = 13; // margin width of 13 pixels on all sides popoverBg.png (62 pixels wide - 36 pixel background) / 2 == 26 / 2 == 13
bgCapSize = 31; // ImageSize/2 == 62 / 2 == 31 pixels
props.leftBgMargin = bgMargin;
props.rightBgMargin = bgMargin;
props.topBgMargin = bgMargin;
props.bottomBgMargin = bgMargin;
props.leftBgCapSize = bgCapSize;
props.topBgCapSize = bgCapSize;
props.bgImageName = bgImageName;
props.leftContentMargin = contentMargin;
props.rightContentMargin = contentMargin - 1; // Need to shift one pixel for border to look correct
props.topContentMargin = contentMargin;
props.bottomContentMargin = contentMargin;
props.arrowMargin = 4.0;
props.upArrowImageName = @"popoverArrowUp.png";
props.downArrowImageName = @"popoverArrowDown.png";
props.leftArrowImageName = @"popoverArrowLeft.png";
props.rightArrowImageName = @"popoverArrowRight.png";
return props;
}
- (void)resetToolbar {
self.navigationItem.leftBarButtonItem = nil;
self.navigationItem.titleView = nil;
self.navigationItem.rightBarButtonItem = nil;
}
@end

View file

@ -33,6 +33,7 @@
- (void)dragStoryToolbar:(int)yCoordinate;
- (void)showUserProfilePopover:(id)sender;
- (void)showFeedMenuPopover:(id)sender;
- (void)showFeedDetailMenuPopover:(id)sender;
- (void)showFontSettingsPopover:(id)sender;
- (void)showSitePopover:(id)sender;
- (void)hidePopover;

View file

@ -16,6 +16,7 @@
#import "InteractionCell.h"
#import "ActivityCell.h"
#import "FeedsMenuViewController.h"
#import "FeedDetailMenuViewController.h"
#import "FontSettingsViewController.h"
#import "AddSiteViewController.h"
@ -255,6 +256,25 @@
animated:YES];
}
- (void)showFeedDetailMenuPopover:(id)sender {
if (popoverController.isPopoverVisible) {
[popoverController dismissPopoverAnimated:NO];
popoverController = nil;
return;
}
popoverController = [[UIPopoverController alloc]
initWithContentViewController:appDelegate.feedDetailMenuViewController];
popoverController.delegate = self;
[popoverController setPopoverContentSize:CGSizeMake(200, 186)];
[popoverController presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
}
- (void)showFontSettingsPopover:(id)sender {
if (popoverController.isPopoverVisible) {
[popoverController dismissPopoverAnimated:NO];

View file

@ -19,8 +19,9 @@
@class NewsBlurViewController;
@class DashboardViewController;
@class FeedDetailViewController;
@class FeedsMenuViewController;
@class FeedDetailViewController;
@class FeedDetailMenuViewController;
@class FeedDashboardViewController;
@class FirstTimeUserViewController;
@class FirstTimeUserAddSitesViewController;
@ -56,10 +57,11 @@
DashboardViewController *dashboardViewController;
NewsBlurViewController *feedsViewController;
FeedsMenuViewController *feedsMenuViewController;
FeedDetailViewController *feedDetailViewController;
FeedDetailMenuViewController *feedDetailMenuViewController;
FeedDashboardViewController *feedDashboardViewController;
FriendsListViewController *friendsListViewController;
FontSettingsViewController *fontSettingsViewController;
FeedDetailViewController *feedDetailViewController;
StoryDetailViewController *storyDetailViewController;
ShareViewController *shareViewController;
@ -127,8 +129,9 @@
@property (nonatomic) IBOutlet DashboardViewController *dashboardViewController;
@property (nonatomic) IBOutlet NewsBlurViewController *feedsViewController;
@property (nonatomic) IBOutlet FeedsMenuViewController *feedsMenuViewController;
@property (nonatomic) IBOutlet FeedDashboardViewController *feedDashboardViewController;
@property (nonatomic) IBOutlet FeedDetailViewController *feedDetailViewController;
@property (nonatomic) IBOutlet FeedDetailMenuViewController *feedDetailMenuViewController;
@property (nonatomic) IBOutlet FeedDashboardViewController *feedDashboardViewController;
@property (nonatomic) IBOutlet FriendsListViewController *friendsListViewController;
@property (nonatomic) IBOutlet StoryDetailViewController *storyDetailViewController;
@property (nonatomic) IBOutlet LoginViewController *loginViewController;

View file

@ -12,6 +12,7 @@
#import "FeedDetailViewController.h"
#import "DashboardViewController.h"
#import "FeedsMenuViewController.h"
#import "FeedDetailMenuViewController.h"
#import "StoryDetailViewController.h"
#import "FirstTimeUserViewController.h"
#import "FriendsListViewController.h"
@ -49,6 +50,7 @@
@synthesize feedsViewController;
@synthesize feedsMenuViewController;
@synthesize feedDetailViewController;
@synthesize feedDetailMenuViewController;
@synthesize feedDashboardViewController;
@synthesize friendsListViewController;
@synthesize fontSettingsViewController;

View file

@ -12,6 +12,7 @@
#import "DashboardViewController.h"
#import "FeedTableCell.h"
#import "FeedsMenuViewController.h"
#import "FeedDetailMenuViewController.h"
#import "UserProfileViewController.h"
#import "StoryDetailViewController.h"
#import "ASIHTTPRequest.h"
@ -558,7 +559,7 @@ static const CGFloat kFolderTitleHeight = 28;
}
[self.popoverController setPopoverContentSize:CGSizeMake(200, 86)];
[self.popoverController presentPopoverFromBarButtonItem:self.navigationItem.rightBarButtonItem
permittedArrowDirections:UIPopoverArrowDirectionAny
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
}
}

View file

@ -371,6 +371,8 @@
FFDE35D6161CCABC0034BFDE /* folder_collapsed.png in Resources */ = {isa = PBXBuildFile; fileRef = FFDE35D4161CCABC0034BFDE /* folder_collapsed.png */; };
FFDE35D7161CCABC0034BFDE /* folder_collapsed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FFDE35D5161CCABC0034BFDE /* folder_collapsed@2x.png */; };
FFDE35DA161D12250034BFDE /* UnreadCountView.m in Sources */ = {isa = PBXBuildFile; fileRef = FFDE35D9161D12250034BFDE /* UnreadCountView.m */; };
FFDE35EA162799B90034BFDE /* FeedDetailMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FFDE35E9162799B90034BFDE /* FeedDetailMenuViewController.m */; };
FFDE35ED1627A1C40034BFDE /* FeedDetailMenuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FFDE35EC1627A1C40034BFDE /* FeedDetailMenuViewController.xib */; };
FFE5322F144C8AC300ACFDE0 /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = FFE5322E144C8AC300ACFDE0 /* Utilities.m */; };
/* End PBXBuildFile section */
@ -892,6 +894,9 @@
FFDE35D5161CCABC0034BFDE /* folder_collapsed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "folder_collapsed@2x.png"; sourceTree = "<group>"; };
FFDE35D8161D12250034BFDE /* UnreadCountView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnreadCountView.h; sourceTree = "<group>"; };
FFDE35D9161D12250034BFDE /* UnreadCountView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnreadCountView.m; sourceTree = "<group>"; };
FFDE35E8162799B90034BFDE /* FeedDetailMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeedDetailMenuViewController.h; sourceTree = "<group>"; };
FFDE35E9162799B90034BFDE /* FeedDetailMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FeedDetailMenuViewController.m; sourceTree = "<group>"; };
FFDE35EC1627A1C40034BFDE /* FeedDetailMenuViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FeedDetailMenuViewController.xib; sourceTree = "<group>"; };
FFE5322D144C8AC300ACFDE0 /* Utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utilities.h; sourceTree = "<group>"; };
FFE5322E144C8AC300ACFDE0 /* Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Utilities.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -924,9 +929,9 @@
children = (
43D8189F15B9404D00733444 /* Models */,
437F974715ACA0C50007136B /* Dashboard */,
431B857415A1324200DCE497 /* Story */,
431B857315A131C300DCE497 /* Feeds */,
431B857215A131B200DCE497 /* Feed-Detail */,
431B857415A1324200DCE497 /* Story */,
431B857115A1317000DCE497 /* FTUX */,
431B857015A1315F00DCE497 /* Social */,
FFD1D72F1459B63500E46F89 /* BaseViewController.h */,
@ -1110,6 +1115,8 @@
7843F50411EEB1A000675F64 /* FeedDetailTableCell.m */,
787A0CD811CE65330056422D /* FeedDetailViewController.h */,
787A0CD911CE65330056422D /* FeedDetailViewController.m */,
FFDE35E8162799B90034BFDE /* FeedDetailMenuViewController.h */,
FFDE35E9162799B90034BFDE /* FeedDetailMenuViewController.m */,
);
name = "Feed-Detail";
sourceTree = "<group>";
@ -1422,6 +1429,7 @@
43B8F019156603170008733D /* AddSiteViewController.xib */,
43B8F01B156603170008733D /* FeedDetailViewController.xib */,
439DAB1F1590DA350019B0EB /* FeedsMenuViewController.xib */,
FFDE35EC1627A1C40034BFDE /* FeedDetailMenuViewController.xib */,
43763AD0158F90B100B3DBE2 /* FontSettingsViewController.xib */,
43B8F01C156603170008733D /* LoginViewController.xib */,
43B8F01D156603170008733D /* MainWindow.xib */,
@ -2126,6 +2134,7 @@
FFDE35D2161B9E600034BFDE /* disclosure_border.png in Resources */,
FFDE35D6161CCABC0034BFDE /* folder_collapsed.png in Resources */,
FFDE35D7161CCABC0034BFDE /* folder_collapsed@2x.png in Resources */,
FFDE35ED1627A1C40034BFDE /* FeedDetailMenuViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2273,6 +2282,7 @@
43CE0F5F15DADB7F00608ED8 /* SiteCell.m in Sources */,
FFDE35CC161B8F870034BFDE /* FolderTitleView.m in Sources */,
FFDE35DA161D12250034BFDE /* UnreadCountView.m in Sources */,
FFDE35EA162799B90034BFDE /* FeedDetailMenuViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -8,11 +8,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Classes/NewsBlurViewController.m"
timestampString = "370996140.882983"
timestampString = "371696871.955155"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "594"
endingLineNumber = "594"
startingLineNumber = "595"
endingLineNumber = "595"
landmarkName = "-switchSitesUnread"
landmarkType = "5">
</FileBreakpoint>

View file

@ -32,22 +32,17 @@
@implementation NSString (HTML)
#pragma mark -
#pragma mark Class Methods
#pragma mark - Instance Methods
#pragma mark -
#pragma mark Instance Methods
// Strip HTML tags
- (NSString *)stringByConvertingHTMLToPlainText {
// Pool
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Character sets
NSCharacterSet *stopCharacters = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"< \t\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]];
NSCharacterSet *newLineAndWhitespaceCharacters = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@" \t\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]];
NSCharacterSet *tagNameCharacters = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]; /**/
NSCharacterSet *stopCharacters = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"< \t\n\r%C%C%C%C", (unichar)0x0085, (unichar)0x000C, (unichar)0x2028, (unichar)0x2029]];
NSCharacterSet *newLineAndWhitespaceCharacters = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@" \t\n\r%C%C%C%C", (unichar)0x0085, (unichar)0x000C, (unichar)0x2028, (unichar)0x2029]];
NSCharacterSet *tagNameCharacters = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"];
// Scan and find all tags
NSMutableString *result = [[NSMutableString alloc] initWithCapacity:self.length];
@ -134,19 +129,22 @@
}
// Decode all HTML entities using GTM
- (NSString *)stringByDecodingHTMLEntities {
// gtm_stringByUnescapingFromHTML can return self so create new string ;)
// Can return self so create new string if we're a mutable string
return [NSString stringWithString:[self gtm_stringByUnescapingFromHTML]];
}
// Encode all HTML entities using GTM
- (NSString *)stringByEncodingHTMLEntities {
// gtm_stringByUnescapingFromHTML can return self so create new string ;)
// Can return self so create new string if we're a mutable string
return [NSString stringWithString:[self gtm_stringByEscapingForAsciiHTML]];
}
// Replace newlines with <br /> tags
- (NSString *)stringByEncodingHTMLEntities:(BOOL)isUnicode {
// Can return self so create new string if we're a mutable string
return [NSString stringWithString:(isUnicode ? [self gtm_stringByEscapingForHTML] : [self gtm_stringByEscapingForAsciiHTML])];
}
- (NSString *)stringWithNewLinesAsBRs {
// Pool
@ -164,7 +162,7 @@
NSMutableString *result = [[NSMutableString alloc] init];
NSString *temp;
NSCharacterSet *newLineCharacters = [NSCharacterSet characterSetWithCharactersInString:
[NSString stringWithFormat:@"\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]];
[NSString stringWithFormat:@"\n\r%C%C%C%C", (unichar)0x0085, (unichar)0x000C, (unichar)0x2028, (unichar)0x2029]];
// Scan
do {
@ -184,7 +182,7 @@
// Scan other new line characters and add <br /> s
if (temp) {
for (int i = 0; i < temp.length; i++) {
for (NSUInteger i = 0; i < temp.length; i++) {
[result appendString:@"<br />"];
}
}
@ -206,7 +204,6 @@
}
// Remove newlines and white space from strong
- (NSString *)stringByRemovingNewLinesAndWhitespace {
// Pool
@ -224,7 +221,7 @@
NSMutableString *result = [[NSMutableString alloc] init];
NSString *temp;
NSCharacterSet *newLineAndWhitespaceCharacters = [NSCharacterSet characterSetWithCharactersInString:
[NSString stringWithFormat:@" \t\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]];
[NSString stringWithFormat:@" \t\n\r%C%C%C%C", (unichar)0x0085, (unichar)0x000C, (unichar)0x2028, (unichar)0x2029]];
// Scan
while (![scanner isAtEnd]) {
@ -256,8 +253,17 @@
}
// Strip HTML tags
// DEPRECIATED - Please use NSString stringByConvertingHTMLToPlainText
- (NSString *)stringByLinkifyingURLs {
if (!NSClassFromString(@"NSRegularExpression")) return self;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *pattern = @"(?<!=\")\\b((http|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%%&amp;:/~\\+#]*[\\w\\-\\@?^=%%&amp;/~\\+#])?)";
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:nil];
NSString *modifiedString = [[regex stringByReplacingMatchesInString:self options:0 range:NSMakeRange(0, [self length])
withTemplate:@"<a href=\"$1\" class=\"linkified\">$1</a>"] retain];
[pool drain];
return [modifiedString autorelease];
}
- (NSString *)stringByStrippingTags {
// Pool

3
media/ios/Popover/UIBarButtonItem+WEPopover.h Normal file → Executable file
View file

@ -7,6 +7,9 @@
*
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface UIBarButtonItem(WEPopover)
- (CGRect)frameInView:(UIView *)v;

40
media/ios/Popover/UIBarButtonItem+WEPopover.m Normal file → Executable file
View file

@ -13,39 +13,33 @@
- (CGRect)frameInView:(UIView *)v {
BOOL hasCustomView = (self.customView != nil);
if (!hasCustomView) {
UIView *tempView = [[UIView alloc] initWithFrame:CGRectZero];
self.customView = tempView;
[tempView release];
UIView *theView = self.customView;
if (!theView && [self respondsToSelector:@selector(view)]) {
theView = [self performSelector:@selector(view)];
}
UIView *parentView = self.customView.superview;
NSUInteger indexOfView = [parentView.subviews indexOfObject:self.customView];
UIView *parentView = theView.superview;
NSArray *subviews = parentView.subviews;
if (!hasCustomView) {
self.customView = nil;
}
NSUInteger indexOfView = [subviews indexOfObject:theView];
NSUInteger subviewCount = subviews.count;
if (subviewCount > 0 && indexOfView != NSNotFound) {
UIView *button = [parentView.subviews objectAtIndex:indexOfView];
return [parentView convertRect:button.frame toView:v];
return [button convertRect:button.bounds toView:v];
} else {
return CGRectZero;
}
}
- (UIView *)superview {
BOOL hasCustomView = (self.customView != nil);
if (!hasCustomView) {
UIView *tempView = [[UIView alloc] initWithFrame:CGRectZero];
self.customView = tempView;
[tempView release];
UIView *theView = self.customView;
if (!theView && [self respondsToSelector:@selector(view)]) {
theView = [self performSelector:@selector(view)];
}
UIView *parentView = self.customView.superview;
if (!hasCustomView) {
self.customView = nil;
}
UIView *parentView = theView.superview;
return parentView;
}

View file

@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/**
* @brief Properties for the container view determining the area where the actual content view can/may be displayed. Also Images can be supplied for the arrow images and background.
@ -91,7 +92,8 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
/**
* @brief To update the position of the popover with a new anchor rect, display area and permitted arrow directions
*/
- (void)updatePositionWithAnchorRect:(CGRect)anchorRect
- (void)updatePositionWithSize:(CGSize)theSize
anchorRect:(CGRect)anchorRect
displayArea:(CGRect)displayArea
permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections;

View file

@ -73,11 +73,17 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
[arrowImage drawInRect:arrowRect blendMode:kCGBlendModeNormal alpha:1.0];
}
- (void)updatePositionWithAnchorRect:(CGRect)anchorRect
- (void)updatePositionWithSize:(CGSize)theSize
anchorRect:(CGRect)anchorRect
displayArea:(CGRect)displayArea
permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections {
correctedSize = CGSizeMake(theSize.width + properties.leftBgMargin + properties.rightBgMargin + properties.leftContentMargin + properties.rightContentMargin,
theSize.height + properties.topBgMargin + properties.bottomBgMargin + properties.topContentMargin + properties.bottomContentMargin);
[self determineGeometryForSize:correctedSize anchorRect:anchorRect displayArea:displayArea permittedArrowDirections:permittedArrowDirections];
[self initFrame];
[self setNeedsDisplay];
}
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
@ -123,7 +129,7 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
bgRect = CGRectOffset(bgRect, arrowOffset.x, arrowOffset.y);
arrowRect = CGRectOffset(arrowRect, arrowOffset.x, arrowOffset.y);
self.frame = theFrame;
self.frame = CGRectIntegral(theFrame);
}
- (CGSize)contentSize {
@ -167,7 +173,7 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
if ((supportedArrowDirections & theArrowDirection)) {
CGRect theBgRect = CGRectZero;
CGRect theBgRect = CGRectMake(0, 0, theSize.width, theSize.height);
CGRect theArrowRect = CGRectZero;
CGPoint theOffset = CGPointZero;
CGFloat xArrowOffset = 0.0;
@ -177,13 +183,12 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
switch (theArrowDirection) {
case UIPopoverArrowDirectionUp:
anchorPoint = CGPointMake(CGRectGetMidX(anchorRect), CGRectGetMaxY(anchorRect));
anchorPoint = CGPointMake(CGRectGetMidX(anchorRect) - displayArea.origin.x, CGRectGetMaxY(anchorRect) - displayArea.origin.y);
xArrowOffset = theSize.width / 2 - upArrowImage.size.width / 2;
yArrowOffset = properties.topBgMargin - upArrowImage.size.height;
theOffset = CGPointMake(anchorPoint.x - xArrowOffset - upArrowImage.size.width / 2, anchorPoint.y - yArrowOffset);
theBgRect = CGRectMake(0, 0, theSize.width, theSize.height);
if (theOffset.x < 0) {
xArrowOffset += theOffset.x;
@ -202,13 +207,12 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
break;
case UIPopoverArrowDirectionDown:
anchorPoint = CGPointMake(CGRectGetMidX(anchorRect), CGRectGetMinY(anchorRect));
anchorPoint = CGPointMake(CGRectGetMidX(anchorRect) - displayArea.origin.x, CGRectGetMinY(anchorRect) - displayArea.origin.y);
xArrowOffset = theSize.width / 2 - downArrowImage.size.width / 2;
yArrowOffset = theSize.height - properties.bottomBgMargin;
theOffset = CGPointMake(anchorPoint.x - xArrowOffset - downArrowImage.size.width / 2, anchorPoint.y - yArrowOffset - downArrowImage.size.height);
theBgRect = CGRectMake(0, 0, theSize.width, theSize.height);
if (theOffset.x < 0) {
xArrowOffset += theOffset.x;
@ -227,13 +231,12 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
break;
case UIPopoverArrowDirectionLeft:
anchorPoint = CGPointMake(CGRectGetMaxX(anchorRect), CGRectGetMidY(anchorRect));
anchorPoint = CGPointMake(CGRectGetMaxX(anchorRect) - displayArea.origin.x, CGRectGetMidY(anchorRect) - displayArea.origin.y);
xArrowOffset = properties.leftBgMargin - leftArrowImage.size.width;
yArrowOffset = theSize.height / 2 - leftArrowImage.size.height / 2;
theOffset = CGPointMake(anchorPoint.x - xArrowOffset, anchorPoint.y - yArrowOffset - leftArrowImage.size.height / 2);
theBgRect = CGRectMake(0, 0, theSize.width, theSize.height);
if (theOffset.y < 0) {
yArrowOffset += theOffset.y;
@ -252,13 +255,12 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
break;
case UIPopoverArrowDirectionRight:
anchorPoint = CGPointMake(CGRectGetMinX(anchorRect), CGRectGetMidY(anchorRect));
anchorPoint = CGPointMake(CGRectGetMinX(anchorRect) - displayArea.origin.x, CGRectGetMidY(anchorRect) - displayArea.origin.y);
xArrowOffset = theSize.width - properties.rightBgMargin;
yArrowOffset = theSize.height / 2 - rightArrowImage.size.width / 2;
theOffset = CGPointMake(anchorPoint.x - xArrowOffset - rightArrowImage.size.width, anchorPoint.y - yArrowOffset - rightArrowImage.size.height / 2);
theBgRect = CGRectMake(0, 0, theSize.width, theSize.height);
if (theOffset.y < 0) {
yArrowOffset += theOffset.y;
@ -275,14 +277,16 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
theArrowRect = CGRectMake(xArrowOffset, yArrowOffset, rightArrowImage.size.width, rightArrowImage.size.height);
break;
default:
break;
}
CGRect bgFrame = CGRectOffset(theBgRect, theOffset.x, theOffset.y);
CGFloat minMarginLeft = CGRectGetMinX(bgFrame) - CGRectGetMinX(displayArea);
CGFloat minMarginRight = CGRectGetMaxX(displayArea) - CGRectGetMaxX(bgFrame);
CGFloat minMarginTop = CGRectGetMinY(bgFrame) - CGRectGetMinY(displayArea);
CGFloat minMarginBottom = CGRectGetMaxY(displayArea) - CGRectGetMaxY(bgFrame);
CGFloat minMarginLeft = CGRectGetMinX(bgFrame);
CGFloat minMarginRight = CGRectGetWidth(displayArea) - CGRectGetMaxX(bgFrame);
CGFloat minMarginTop = CGRectGetMinY(bgFrame);
CGFloat minMarginBottom = CGRectGetHeight(displayArea) - CGRectGetMaxY(bgFrame);
if (minMarginLeft < 0) {
// Popover is too wide and clipped on the left; decrease width
@ -320,19 +324,18 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
theArrowRect.origin.y = CGRectGetMinY(theBgRect) - upArrowImage.size.height + properties.topBgMargin;
}
}
bgFrame = CGRectOffset(theBgRect, theOffset.x, theOffset.y);
// bgFrame = CGRectOffset(theBgRect, theOffset.x, theOffset.y);
CGFloat minMargin = MIN(minMarginLeft, minMarginRight);
minMargin = MIN(minMargin, minMarginTop);
minMargin = MIN(minMargin, minMarginBottom);
// Calculate intersection and surface
CGRect intersection = CGRectIntersection(displayArea, bgFrame);
CGFloat surface = intersection.size.width * intersection.size.height;
CGFloat surface = theBgRect.size.width * theBgRect.size.height;
if (surface >= biggestSurface && minMargin >= currentMinMargin) {
biggestSurface = surface;
offset = theOffset;
offset = CGPointMake(theOffset.x + displayArea.origin.x, theOffset.y + displayArea.origin.y);
arrowRect = theArrowRect;
bgRect = theBgRect;
arrowDirection = theArrowDirection;
@ -356,6 +359,8 @@ permittedArrowDirections:(UIPopoverArrowDirection)permittedArrowDirections
case UIPopoverArrowDirectionRight:
arrowImage = [rightArrowImage retain];
break;
default:
break;
}
}

View file

@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "WEPopoverContainerView.h"
#import "WETouchableView.h"
@ -25,6 +26,7 @@
@interface WEPopoverController : NSObject<WETouchableViewDelegate> {
UIViewController *contentViewController;
UIView *view;
UIView *parentView;
WETouchableView *backgroundView;
BOOL popoverVisible;
@ -45,6 +47,7 @@
@property (nonatomic, assign) CGSize popoverContentSize;
@property (nonatomic, retain) WEPopoverContainerViewProperties *containerViewProperties;
@property (nonatomic, retain) id <NSObject> context;
@property (nonatomic, assign) UIView *parentView;
@property (nonatomic, copy) NSArray *passthroughViews;
- (id)initWithContentViewController:(UIViewController *)theContentViewController;
@ -64,4 +67,9 @@
inView:(UIView *)view
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections;
- (void)repositionPopoverFromRect:(CGRect)rect
inView:(UIView *)view
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
animated:(BOOL)animated;
@end

View file

@ -10,7 +10,7 @@
#import "WEPopoverParentView.h"
#import "UIBarButtonItem+WEPopover.h"
#define FADE_DURATION 0.25
#define FADE_DURATION 0.3
@interface WEPopoverController(Private)
@ -32,6 +32,7 @@
@synthesize popoverArrowDirection;
@synthesize delegate;
@synthesize view;
@synthesize parentView;
@synthesize containerViewProperties;
@synthesize context;
@synthesize passthroughViews;
@ -66,6 +67,10 @@
}
}
- (BOOL)forwardAppearanceMethods {
return ![contentViewController respondsToSelector:@selector(automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers)];
}
//Overridden setter to copy the passthroughViews to the background view if it exists already
- (void)setPassthroughViews:(NSArray *)array {
[passthroughViews release];
@ -81,10 +86,16 @@
if ([animationID isEqual:@"FadeIn"]) {
self.view.userInteractionEnabled = YES;
popoverVisible = YES;
if ([self forwardAppearanceMethods]) {
[contentViewController viewDidAppear:YES];
} else {
}
} else if ([animationID isEqual:@"FadeOut"]) {
popoverVisible = NO;
if ([self forwardAppearanceMethods]) {
[contentViewController viewDidDisappear:YES];
}
[self.view removeFromSuperview];
self.view = nil;
[backgroundView removeFromSuperview];
@ -124,7 +135,7 @@
[self dismissPopoverAnimated:NO];
//First force a load view for the contentViewController so the popoverContentSize is properly initialized
contentViewController.view;
[contentViewController view];
if (CGSizeEqualToSize(popoverContentSize, CGSizeZero)) {
popoverContentSize = contentViewController.contentSizeForViewInPopover;
@ -162,40 +173,72 @@
self.view = containerView;
[self updateBackgroundPassthroughViews];
if ([self forwardAppearanceMethods]) {
[contentViewController viewWillAppear:animated];
}
[self.view becomeFirstResponder];
popoverVisible = YES;
if (animated) {
self.view.alpha = 0.0;
[UIView beginAnimations:@"FadeIn" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView setAnimationDuration:FADE_DURATION];
[UIView animateWithDuration:FADE_DURATION
delay:0.0
options:UIViewAnimationCurveLinear
animations:^{
self.view.alpha = 1.0;
[UIView commitAnimations];
} completion:^(BOOL finished) {
[self animationDidStop:@"FadeIn" finished:[NSNumber numberWithBool:finished] context:nil];
}];
} else {
popoverVisible = YES;
if ([self forwardAppearanceMethods]) {
[contentViewController viewDidAppear:animated];
}
}
}
- (void)repositionPopoverFromRect:(CGRect)rect
inView:(UIView *)theView
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections {
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
{
[self repositionPopoverFromRect:rect
inView:theView
permittedArrowDirections:arrowDirections
animated:NO];
}
- (void)repositionPopoverFromRect:(CGRect)rect
inView:(UIView *)theView
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
animated:(BOOL)animated {
if (animated) {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:FADE_DURATION];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
}
if (CGSizeEqualToSize(popoverContentSize, CGSizeZero)) {
popoverContentSize = contentViewController.contentSizeForViewInPopover;
}
CGRect displayArea = [self displayAreaForView:theView];
WEPopoverContainerView *containerView = (WEPopoverContainerView *)self.view;
[containerView updatePositionWithAnchorRect:rect
[containerView updatePositionWithSize:self.popoverContentSize
anchorRect:rect
displayArea:displayArea
permittedArrowDirections:arrowDirections];
popoverArrowDirection = containerView.arrowDirection;
containerView.frame = [theView convertRect:containerView.frame toView:backgroundView];
if (animated) {
[UIView commitAnimations];
}
}
#pragma mark -
@ -209,12 +252,30 @@
}
}
- (BOOL)isPopoverVisible {
if (!popoverVisible) {
return NO;
}
UIView *sv = self.view;
BOOL foundWindowAsSuperView = NO;
while ((sv = sv.superview) != nil) {
if ([sv isKindOfClass:[UIWindow class]]) {
foundWindowAsSuperView = YES;
break;
}
}
return foundWindowAsSuperView;
}
@end
@implementation WEPopoverController(Private)
- (UIView *)keyView {
if (self.parentView) {
return self.parentView;
} else {
UIWindow *w = [[UIApplication sharedApplication] keyWindow];
if (w.subviews.count > 0) {
return [w.subviews objectAtIndex:0];
@ -222,6 +283,7 @@
return w;
}
}
}
- (void)setView:(UIView *)v {
if (view != v) {
@ -237,23 +299,31 @@
- (void)dismissPopoverAnimated:(BOOL)animated userInitiated:(BOOL)userInitiated {
if (self.view) {
if ([self forwardAppearanceMethods]) {
[contentViewController viewWillDisappear:animated];
}
popoverVisible = NO;
[self.view resignFirstResponder];
if (animated) {
self.view.userInteractionEnabled = NO;
[UIView beginAnimations:@"FadeOut" context:[NSNumber numberWithBool:userInitiated]];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView setAnimationDuration:FADE_DURATION];
[UIView animateWithDuration:FADE_DURATION
delay:0.0
options:UIViewAnimationCurveLinear
animations:^{
self.view.alpha = 0.0;
[UIView commitAnimations];
} completion:^(BOOL finished) {
[self animationDidStop:@"FadeOut" finished:[NSNumber numberWithBool:finished] context:[NSNumber numberWithBool:userInitiated]];
}];
} else {
if ([self forwardAppearanceMethods]) {
[contentViewController viewDidDisappear:animated];
}
[self.view removeFromSuperview];
self.view = nil;
[backgroundView removeFromSuperview];
@ -268,7 +338,8 @@
if ([theView conformsToProtocol:@protocol(WEPopoverParentView)] && [theView respondsToSelector:@selector(displayAreaForPopover)]) {
displayArea = [(id <WEPopoverParentView>)theView displayAreaForPopover];
} else {
displayArea = [[[UIApplication sharedApplication] keyWindow] convertRect:[[UIScreen mainScreen] applicationFrame] toView:theView];
UIView *keyView = [self keyView];
displayArea = [keyView convertRect:keyView.bounds toView:theView];
}
return displayArea;
}

View file

@ -7,6 +7,9 @@
*
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol WEPopoverParentView
@optional

1
media/ios/Popover/WETouchableView.h Normal file → Executable file
View file

@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class WETouchableView;

0
media/ios/Popover/WETouchableView.m Normal file → Executable file
View file

View file

@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C54</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</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">1181</string>
<string key="NS.object.0">1926</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIBarButtonItem</string>
<string>IBUILabel</string>
<string>IBUIImageView</string>
<string>IBUIActivityIndicatorView</string>
<string>IBUITextField</string>
<string>IBUIBarButtonItem</string>
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBUINavigationBar</string>
<string>IBUINavigationItem</string>
<string>IBUIPickerView</string>
<string>IBUITextField</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
@ -47,7 +47,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, 44}, {768, 874}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="864978609"/>
<string key="NSReuseIdentifierKey">_NS:541</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
@ -62,7 +61,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{131, 146}, {389, 20}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="715092773"/>
<string key="NSReuseIdentifierKey">_NS:196</string>
<object class="NSColor" key="IBUIBackgroundColor" id="915035019">
@ -78,7 +76,6 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{126, 272}, {288, 48}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="434594381"/>
<string key="NSReuseIdentifierKey">_NS:311</string>
<bool key="IBUIOpaque">NO</bool>
@ -95,6 +92,7 @@
<object class="NSColor" key="IBUIShadowColor" id="458025816">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
</object>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">17</float>
@ -111,13 +109,13 @@
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
<double key="preferredMaxLayoutWidth">288</double>
</object>
<object class="IBUILabel" id="876700848">
<reference key="NSNextResponder" ref="612255706"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{251, 270}, {189, 52}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="92066299"/>
<string key="NSReuseIdentifierKey">_NS:311</string>
<bool key="IBUIOpaque">NO</bool>
@ -142,7 +140,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{43, 142}, {61, 28}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="714055721"/>
<string key="NSReuseIdentifierKey">_NS:311</string>
<bool key="IBUIOpaque">NO</bool>
@ -172,7 +169,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{55, 226}, {49, 31}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="522048353"/>
<string key="NSReuseIdentifierKey">_NS:311</string>
<bool key="IBUIOpaque">NO</bool>
@ -195,7 +191,6 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{223, 286}, {20, 20}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="876700848"/>
<string key="NSReuseIdentifierKey">_NS:824</string>
<bool key="IBUIOpaque">NO</bool>
@ -206,7 +201,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{540, 44}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="347019207"/>
<string key="NSReuseIdentifierKey">_NS:240</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -236,8 +230,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{0, 404}, {540, 216}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:624</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIShowsSelectionIndicator">YES</bool>
@ -247,7 +239,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{131, 226}, {304, 31}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="949390072"/>
<string key="NSReuseIdentifierKey">_NS:294</string>
<bool key="IBUIOpaque">NO</bool>
@ -280,7 +271,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{55, 183}, {49, 31}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="78857574"/>
<string key="NSReuseIdentifierKey">_NS:311</string>
<bool key="IBUIOpaque">NO</bool>
@ -303,7 +293,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{131, 183}, {304, 31}}</string>
<reference key="NSSuperview" ref="612255706"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="464452035"/>
<string key="NSReuseIdentifierKey">_NS:294</string>
<bool key="IBUIOpaque">NO</bool>
@ -331,7 +320,6 @@
</array>
<string key="NSFrameSize">{540, 620}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="727310282"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">10</int>
@ -6519,7 +6507,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
@ -6527,6 +6515,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="NS.key.0">Background.png</string>
<string key="NS.object.0">{320, 480}</string>
</object>
<string key="IBCocoaTouchPluginVersion">1181</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C54</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</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">1181</string>
<string key="NS.object.0">1926</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>IBProxyObject</string>
<string>IBUIBarButtonItem</string>
<string>IBUILabel</string>
<string>IBUIToolbar</string>
<string>IBUIProgressView</string>
<string>IBUIWebView</string>
<string>IBUIToolbar</string>
<string>IBUIView</string>
<string>IBUIWebView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -48,7 +48,6 @@
<int key="NSvFlags">301</int>
<string key="NSFrame">{{315, 455}, {139, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="155973878"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -65,6 +64,7 @@
<object class="NSColor" key="IBUIShadowColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
</object>
<string key="IBUIShadowOffset">{0, 1}</string>
<int key="IBUIBaselineAdjustment">0</int>
@ -84,7 +84,6 @@
<int key="NSvFlags">-2147483374</int>
<string key="NSFrameSize">{768, 936}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="409639211"/>
<object class="NSColor" key="IBUIBackgroundColor" id="277502852">
<int key="NSColorSpace">10</int>
@ -4497,7 +4496,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{334, 17}, {100, 11}}</string>
<reference key="NSSuperview" ref="155973878"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="88679899"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -4507,7 +4505,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
</object>
<string key="NSFrame">{{0, 936}, {768, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="484194819"/>
<reference key="IBUIBackgroundColor" ref="175998734"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@ -4578,7 +4575,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 936}, {768, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="125226722"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -4593,7 +4589,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{335, 936}, {100, 61}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -4601,7 +4596,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
</object>
<string key="NSFrameSize">{768, 980}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="506862915"/>
<reference key="IBUIBackgroundColor" ref="277502852"/>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -7296,7 +7290,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
<real value="1536" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@ -7308,6 +7302,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="NS.key.0">06-arrow-south.png</string>
<string key="NS.object.0">{10, 12}</string>
</object>
<string key="IBCocoaTouchPluginVersion">1181</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C54</string>
<string key="IBDocument.InterfaceBuilderVersion">2840</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">1181</string>
<string key="NS.object.0">1926</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>IBProxyObject</string>
<string>IBUINavigationController</string>
<string>IBUIViewController</string>
<string>IBUICustomObject</string>
<string>IBUIWindow</string>
<string>IBUINavigationBar</string>
<string>IBUINavigationController</string>
<string>IBUINavigationItem</string>
<string>IBUIViewController</string>
<string>IBUIWindow</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -149,6 +149,17 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="145405670">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="449948846">
<string key="IBUINibName">FeedDetailViewController</string>
<reference key="IBUISimulatedStatusBarMetrics" ref="750341349"/>
@ -293,7 +304,6 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="813520712">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="165811166">
<reference key="IBUINavigationBar"/>
<string key="IBUITitle">Title</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
@ -491,6 +501,14 @@
</object>
<int key="connectionID">277</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">feedDetailMenuViewController</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="145405670"/>
</object>
<int key="connectionID">280</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">appDelegate</string>
@ -643,6 +661,14 @@
</object>
<int key="connectionID">269</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">appDelegate</string>
<reference key="source" ref="145405670"/>
<reference key="destination" ref="664661524"/>
</object>
<int key="connectionID">279</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -807,6 +833,11 @@
<reference key="object" ref="231215530"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">278</int>
<reference key="object" ref="145405670"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -864,6 +895,8 @@
<string>264.IBPluginDependency</string>
<string>268.CustomClassName</string>
<string>268.IBPluginDependency</string>
<string>278.CustomClassName</string>
<string>278.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
<string>51.CustomClassName</string>
@ -947,6 +980,8 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>FindSitesViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>FeedDetailMenuViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>NewsBlurAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>FeedDetailViewController</string>
@ -975,7 +1010,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">277</int>
<int key="maxID">280</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -1294,6 +1329,46 @@
<string key="minorKey">./Classes/DashboardViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDetailMenuViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>menuTableView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UITableView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>menuTableView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">menuTableView</string>
<string key="candidateClassName">UITableView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/FeedDetailMenuViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDetailViewController</string>
<string key="superclassName">BaseViewController</string>
@ -1302,7 +1377,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doOpenMarkReadActionSheet:</string>
<string>doOpenSettingsActionSheet</string>
<string>doOpenSettingsActionSheet:</string>
<string>selectIntelligence</string>
</object>
<object class="NSArray" key="dict.values">
@ -1317,7 +1392,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doOpenMarkReadActionSheet:</string>
<string>doOpenSettingsActionSheet</string>
<string>doOpenSettingsActionSheet:</string>
<string>selectIntelligence</string>
</object>
<object class="NSArray" key="dict.values">
@ -1327,7 +1402,7 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">doOpenSettingsActionSheet</string>
<string key="name">doOpenSettingsActionSheet:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
@ -1669,7 +1744,7 @@
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UIButton</string>
<string>UILabel</string>
<string>UIBarButtonItem</string>
</object>
</object>
@ -1689,7 +1764,7 @@
</object>
<object class="IBToOneOutletInfo">
<string key="name">instructionsLabel</string>
<string key="candidateClassName">UIButton</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">nextButton</string>
@ -1706,63 +1781,39 @@
<string key="className">FirstTimeUserAddSitesViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>tapCategoryButton:</string>
<string>tapGoogleReaderButton</string>
<string>tapNextButton</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
<string key="NS.key.0">tapNextButton</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>tapCategoryButton:</string>
<string>tapGoogleReaderButton</string>
<string>tapNextButton</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">tapCategoryButton:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">tapGoogleReaderButton</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="NS.key.0">tapNextButton</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">tapNextButton</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>activityIndicator</string>
<string>appDelegate</string>
<string>categoriesTable</string>
<string>googleReaderButton</string>
<string>googleReaderButtonWrapper</string>
<string>instructionLabel</string>
<string>nextButton</string>
<string>scrollView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIActivityIndicatorView</string>
<string>NewsBlurAppDelegate</string>
<string>UITableView</string>
<string>UIButton</string>
<string>UIView</string>
<string>UILabel</string>
<string>UIBarButtonItem</string>
<string>UIScrollView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@ -1771,10 +1822,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>activityIndicator</string>
<string>appDelegate</string>
<string>categoriesTable</string>
<string>googleReaderButton</string>
<string>googleReaderButtonWrapper</string>
<string>instructionLabel</string>
<string>nextButton</string>
<string>scrollView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -1786,6 +1839,10 @@
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">categoriesTable</string>
<string key="candidateClassName">UITableView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">googleReaderButton</string>
<string key="candidateClassName">UIButton</string>
@ -1802,6 +1859,10 @@
<string key="name">nextButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">scrollView</string>
<string key="candidateClassName">UIScrollView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@ -2405,6 +2466,7 @@
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailMenuViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
<string>feedsViewController</string>
@ -2431,6 +2493,7 @@
<string>AddSiteViewController</string>
<string>DashboardViewController</string>
<string>FeedDashboardViewController</string>
<string>FeedDetailMenuViewController</string>
<string>FeedDetailViewController</string>
<string>FeedsMenuViewController</string>
<string>NewsBlurViewController</string>
@ -2460,6 +2523,7 @@
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailMenuViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
<string>feedsViewController</string>
@ -2495,6 +2559,10 @@
<string key="name">feedDashboardViewController</string>
<string key="candidateClassName">FeedDashboardViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedDetailMenuViewController</string>
<string key="candidateClassName">FeedDetailMenuViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedDetailViewController</string>
<string key="candidateClassName">FeedDetailViewController</string>
@ -2649,6 +2717,8 @@
<string>homeButton</string>
<string>innerView</string>
<string>intelligenceControl</string>
<string>noFocusMessage</string>
<string>toolbarLeftMargin</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -2659,6 +2729,8 @@
<string>UIBarButtonItem</string>
<string>UIView</string>
<string>UISegmentedControl</string>
<string>UIView</string>
<string>UIBarButtonItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@ -2672,6 +2744,8 @@
<string>homeButton</string>
<string>innerView</string>
<string>intelligenceControl</string>
<string>noFocusMessage</string>
<string>toolbarLeftMargin</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -2703,6 +2777,14 @@
<string key="name">intelligenceControl</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">noFocusMessage</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbarLeftMargin</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@ -3171,7 +3253,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
<real value="1536" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@ -3179,6 +3261,6 @@
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">1181</string>
<string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -63,6 +63,15 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="351846807">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="449948846">
<string key="IBUINibName">FeedDetailViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -208,11 +217,9 @@
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIWindow" id="117978783">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@ -425,6 +432,14 @@
</object>
<int key="connectionID">156</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">feedDetailMenuViewController</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="351846807"/>
</object>
<int key="connectionID">167</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">appDelegate</string>
@ -553,6 +568,14 @@
</object>
<int key="connectionID">157</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">appDelegate</string>
<reference key="source" ref="351846807"/>
<reference key="destination" ref="664661524"/>
</object>
<int key="connectionID">166</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -707,6 +730,11 @@
<reference key="object" ref="778518863"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">165</int>
<reference key="object" ref="351846807"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -748,6 +776,8 @@
<string>151.IBPluginDependency</string>
<string>152.CustomClassName</string>
<string>152.IBPluginDependency</string>
<string>165.CustomClassName</string>
<string>165.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
<string>39.IBPluginDependency</string>
@ -797,6 +827,8 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>FirstTimeUserAddSitesViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>FeedDetailMenuViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>NewsBlurAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -822,7 +854,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">164</int>
<int key="maxID">167</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -1141,6 +1173,46 @@
<string key="minorKey">./Classes/DashboardViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDetailMenuViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>menuTableView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NewsBlurAppDelegate</string>
<string>UITableView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>appDelegate</string>
<string>menuTableView</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">menuTableView</string>
<string key="candidateClassName">UITableView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/FeedDetailMenuViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDetailViewController</string>
<string key="superclassName">BaseViewController</string>
@ -1149,7 +1221,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doOpenMarkReadActionSheet:</string>
<string>doOpenSettingsActionSheet</string>
<string>doOpenSettingsActionSheet:</string>
<string>selectIntelligence</string>
</object>
<object class="NSArray" key="dict.values">
@ -1164,7 +1236,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doOpenMarkReadActionSheet:</string>
<string>doOpenSettingsActionSheet</string>
<string>doOpenSettingsActionSheet:</string>
<string>selectIntelligence</string>
</object>
<object class="NSArray" key="dict.values">
@ -1174,7 +1246,7 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">doOpenSettingsActionSheet</string>
<string key="name">doOpenSettingsActionSheet:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
@ -2238,6 +2310,7 @@
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailMenuViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
<string>feedsViewController</string>
@ -2264,6 +2337,7 @@
<string>AddSiteViewController</string>
<string>DashboardViewController</string>
<string>FeedDashboardViewController</string>
<string>FeedDetailMenuViewController</string>
<string>FeedDetailViewController</string>
<string>FeedsMenuViewController</string>
<string>NewsBlurViewController</string>
@ -2293,6 +2367,7 @@
<string>addSiteViewController</string>
<string>dashboardViewController</string>
<string>feedDashboardViewController</string>
<string>feedDetailMenuViewController</string>
<string>feedDetailViewController</string>
<string>feedsMenuViewController</string>
<string>feedsViewController</string>
@ -2328,6 +2403,10 @@
<string key="name">feedDashboardViewController</string>
<string key="candidateClassName">FeedDashboardViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedDetailMenuViewController</string>
<string key="candidateClassName">FeedDetailMenuViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">feedDetailViewController</string>
<string key="candidateClassName">FeedDetailViewController</string>

View file

@ -192,7 +192,7 @@ signatureProvider:(id<OASignatureProviding, NSObject>)aProvider
- (void)_generateTimestamp
{
timestamp = [[NSString stringWithFormat:@"%d", time(NULL)] retain];
timestamp = [[NSString stringWithFormat:@"%d", (int)time(NULL)] retain];
}
- (void)_generateNonce

View file

@ -483,7 +483,7 @@ static NSDictionary *sharersDictionary = nil;
}
// Generate a unique id for the share to use when saving associated files
NSString *uid = [NSString stringWithFormat:@"%@-%i-%i-%i", sharerId, item.shareType, [[NSDate date] timeIntervalSince1970], arc4random()];
NSString *uid = [NSString stringWithFormat:@"%@-%i-%i-%i", sharerId, item.shareType, (int)[[NSDate date] timeIntervalSince1970], arc4random()];
// store image in cache

View file

@ -85,7 +85,7 @@ static NSString *const kSHKFacebookUserInfo =@"kSHKFacebookUserInfo";
if (![fileManager fileExistsAtPath:imagePath])
[fileManager createDirectoryAtPath:imagePath withIntermediateDirectories:YES attributes:nil error:nil];
NSString *uid = [NSString stringWithFormat:@"img-%i-%i", [[NSDate date] timeIntervalSince1970], arc4random()];
NSString *uid = [NSString stringWithFormat:@"img-%i-%i", (int)[[NSDate date] timeIntervalSince1970], arc4random()];
// store image in cache
NSData *imageData = UIImagePNGRepresentation(image);
imagePath = [imagePath stringByAppendingPathComponent:uid];

View file

@ -586,7 +586,7 @@ static NSString *const kSHKTwitterUserInfo=@"kSHKTwitterUserInfo";
// no ops
} else {
[body appendData:[[NSString stringWithFormat:@"--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"message\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[@"Content-Disposition: form-data; name=\"message\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[item customValueForKey:@"status"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
}

View file

@ -144,7 +144,7 @@ static const NSTimeInterval kTimeoutInterval = 180.0;
data:[NSString stringWithFormat:
@"Content-Disposition: form-data; filename=\"%@\"\r\n", key]];
[self utfAppendBody:body
data:[NSString stringWithString:@"Content-Type: image/png\r\n\r\n"]];
data:[NSString stringWithFormat:@"Content-Type: image/png\r\n\r\n"]];
[body appendData:imageData];
} else {
NSAssert([dataParam isKindOfClass:[NSData class]],
@ -153,7 +153,7 @@ static const NSTimeInterval kTimeoutInterval = 180.0;
data:[NSString stringWithFormat:
@"Content-Disposition: form-data; filename=\"%@\"\r\n", key]];
[self utfAppendBody:body
data:[NSString stringWithString:@"Content-Type: content/unknown\r\n\r\n"]];
data:[NSString stringWithFormat:@"Content-Type: content/unknown\r\n\r\n"]];
[body appendData:(NSData*)dataParam];
}
[self utfAppendBody:body data:endLine];