├── .gitattributes ├── .gitignore ├── LICENSE └── Source ├── ABDeprecatedMethods.h ├── Additional ├── ScreenLockViewController.h ├── ScreenLockViewController.m ├── SplashView.h ├── SplashView.m ├── UserDetailsViewController.h └── UserDetailsViewController.m ├── Common ├── Additions │ ├── NSArray+ABAdditions.h │ ├── NSArray+ABAdditions.m │ ├── NSAttributedString+ABAdditions.h │ ├── NSAttributedString+ABAdditions.m │ ├── NSDate+ABAdditions.h │ ├── NSDate+ABAdditions.m │ ├── NSDictionary+UrlEncoding.h │ ├── NSDictionary+UrlEncoding.m │ ├── NSMutableArray+ABAdditions.h │ ├── NSMutableArray+ABAdditions.m │ ├── NSMutableAttributedString+ABAdditions.h │ ├── NSMutableAttributedString+ABAdditions.m │ ├── NSMutableString+ABAdditions.h │ ├── NSMutableString+ABAdditions.m │ ├── NSString+ABAdditions.h │ ├── NSString+ABAdditions.m │ ├── NSString+ABLegacyLinkTypes.h │ ├── NSString+ABLegacyLinkTypes.m │ ├── NSString+Base64.h │ ├── NSString+Base64.m │ ├── NSString+HTML.h │ ├── NSString+HTML.m │ ├── UIApplication+ABAdditions.h │ ├── UIApplication+ABAdditions.m │ ├── UIBarButtonItem+Skin.h │ ├── UIBarButtonItem+Skin.m │ ├── UIBezierPath+Shapes.h │ ├── UIBezierPath+Shapes.m │ ├── UIColor+Skin.h │ ├── UIColor+Skin.m │ ├── UIFont+Skin.h │ ├── UIFont+Skin.m │ ├── UIImage+ABAdditions.h │ ├── UIImage+ABAdditions.m │ ├── UIImage+ABDiskCache.h │ ├── UIImage+ABDiskCache.m │ ├── UIImage+Alpha.h │ ├── UIImage+Alpha.m │ ├── UIImage+Assets.h │ ├── UIImage+Assets.m │ ├── UIImage+Resize.h │ ├── UIImage+Resize.m │ ├── UIImage+RoundedCorner.h │ ├── UIImage+RoundedCorner.m │ ├── UIImage+Skin.h │ ├── UIImage+Skin.m │ ├── UIImageView+JMAFNetworking.h │ ├── UIImageView+JMAFNetworking.m │ ├── UINavigationBar+ABStyle.h │ ├── UINavigationBar+ABStyle.m │ ├── UINavigationController+ABAdditions.h │ ├── UINavigationController+ABAdditions.m │ ├── UITableViewCell+Transparency.h │ ├── UITableViewCell+Transparency.m │ ├── UIView+Additions.h │ ├── UIView+Additions.m │ ├── UIViewController+Additions.h │ └── UIViewController+Additions.m ├── AppDelegate │ ├── AlienBlueAppDelegate+UAT.h │ ├── AlienBlueAppDelegate+UAT.m │ ├── AlienBlueAppDelegate.h │ ├── AlienBlueAppDelegate.m │ ├── ReachabilityCoordinator.h │ └── ReachabilityCoordinator.m ├── BlueImports.h ├── Compatibility │ ├── AFURLConnectionOperation+JMOutputStreamFlush.h │ └── AFURLConnectionOperation+JMOutputStreamFlush.m ├── Events │ ├── ABDataEvent.h │ ├── ABDataEvent.m │ ├── ABEventLogger.h │ └── ABEventLogger.m ├── Navigation │ ├── ABActionMenuFavoriteLinkEditPanel.h │ ├── ABActionMenuFavoriteLinkEditPanel.m │ ├── ABActionMenuHost.h │ ├── ABActionMenuHost.m │ ├── ABActionMenuKarmaEditPanel.h │ ├── ABActionMenuKarmaEditPanel.m │ ├── ABActionMenuKarmaStatistics.h │ ├── ABActionMenuKarmaStatistics.m │ ├── ABActionMenuThemeConfiguration.h │ ├── ABActionMenuThemeConfiguration.m │ ├── ABActionMenuWatchedCommentStatistics.h │ ├── ABActionMenuWatchedCommentStatistics.m │ ├── ABActionMenuWatchedPostEditPanel.h │ ├── ABActionMenuWatchedPostEditPanel.m │ ├── ABActionMenuWatchedPostStatistics.h │ ├── ABActionMenuWatchedPostStatistics.m │ ├── ABNavigationBar.h │ ├── ABNavigationBar.m │ ├── ABNavigationController.h │ ├── ABNavigationController.m │ ├── ABPlaceholderNavigationController.h │ ├── ABPlaceholderNavigationController.m │ ├── ABTableView.h │ ├── ABTableView.m │ ├── ABToolbar.h │ ├── ABToolbar.m │ ├── ActionMenuManager.h │ ├── ActionMenuManager.m │ ├── BrowserActionMenuHost.h │ ├── BrowserActionMenuHost.m │ ├── CommentsActionMenuHost.h │ ├── CommentsActionMenuHost.m │ ├── HomeActionMenuHost.h │ ├── HomeActionMenuHost.m │ ├── NavigationManager+Deprecated.h │ ├── NavigationManager+Deprecated.m │ ├── NavigationManager.h │ ├── NavigationManager.m │ ├── NavigationStateCoordinator.h │ ├── NavigationStateCoordinator.m │ ├── PostsActionMenuHost.h │ ├── PostsActionMenuHost.m │ ├── PostsNavigation.h │ ├── PostsNavigation.m │ ├── PromptManager.h │ ├── PromptManager.m │ ├── StatefulControllerProtocol.h │ ├── TiltManager.h │ └── TiltManager.m ├── Note │ ├── EMAddNoteViewController.h │ ├── EMAddNoteViewController.m │ ├── JMTextView.h │ ├── JMTextView.m │ ├── JMTextViewController.h │ ├── JMTextViewController.m │ ├── TextViewCell.h │ └── TextViewCell.m ├── Skin │ ├── ABBundleManager.h │ ├── ABBundleManager.m │ ├── ABBundleManagerKeys.h │ ├── SubredditManager.h │ └── SubredditManager.m ├── SyncHandlers │ ├── FolderChangeTrackRecord+Sync.h │ ├── FolderChangeTrackRecord+Sync.m │ ├── GroupSyncHandler.h │ ├── GroupSyncHandler.m │ ├── SyncManager+AlienBlue.h │ ├── SyncManager+AlienBlue.m │ ├── TemplatesSyncHandler.h │ ├── TemplatesSyncHandler.m │ ├── VisitedLinksSyncHandler.h │ └── VisitedLinksSyncHandler.m └── Views │ ├── ABButton.h │ ├── ABButton.m │ ├── ABHoverLoadingIndicatorView.h │ ├── ABHoverLoadingIndicatorView.m │ ├── ABHoverPreviewView.h │ ├── ABHoverPreviewView.m │ ├── ABHoverScrubberView.h │ ├── ABHoverScrubberView.m │ ├── ABHoverVolumeControlView.h │ ├── ABHoverVolumeControlView.m │ ├── ABMailComposer.h │ ├── ABMailComposer.m │ ├── ABOutlineViewController.h │ ├── ABOutlineViewController.m │ ├── ABTableCell.h │ ├── ABTableCell.m │ ├── ABTableCellDrawerView.h │ ├── ABTableCellDrawerView.m │ ├── ABTableCellView.h │ ├── ABTableCellView.m │ ├── ABWindow.h │ ├── ABWindow.m │ ├── JMAnimatedSlideIndicatorView.h │ ├── JMAnimatedSlideIndicatorView.m │ ├── JMSurfaceButton.h │ ├── JMSurfaceButton.m │ ├── JMTextField.h │ ├── JMTextField.m │ ├── JMTextFieldEntry.h │ ├── JMTextFieldEntry.m │ ├── JMTextFieldEntryCell.h │ ├── JMTextFieldEntryCell.m │ ├── ModerationSupportedTableDrawerView.h │ ├── ModerationSupportedTableDrawerView.m │ ├── OptionCell.h │ ├── OptionCell.m │ ├── OptionCellView.h │ ├── OptionCellView.m │ ├── OptionTableViewController.h │ ├── OptionTableViewController.m │ ├── TransparentCell.h │ ├── TransparentCell.m │ ├── TransparentCellContentView.h │ ├── TransparentCellContentView.m │ ├── TransparentToolbar.h │ ├── TransparentToolbar.m │ ├── ViewContainerCell.h │ └── ViewContainerCell.m ├── Detail ├── Comments │ ├── REDCommentsController+API.h │ ├── REDCommentsController+API.m │ ├── REDCommentsController+Interaction.h │ ├── REDCommentsController+Interaction.m │ ├── REDCommentsController+LinkHandling.h │ ├── REDCommentsController+LinkHandling.m │ ├── REDCommentsController+NavigationBar.h │ ├── REDCommentsController+NavigationBar.m │ ├── REDCommentsController+PopoverOptions.h │ ├── REDCommentsController+PopoverOptions.m │ ├── REDCommentsController+ReplyInteraction.h │ ├── REDCommentsController+ReplyInteraction.m │ ├── REDCommentsController+State.h │ ├── REDCommentsController+State.m │ ├── REDCommentsController.h │ └── REDCommentsController.m ├── REDDetailHeaderCell.h ├── REDDetailHeaderCell.m ├── REDDetailPhotoCell.h ├── REDDetailPhotoCell.m ├── REDDetailSelfTextCell.h ├── REDDetailSelfTextCell.m ├── REDDetailVideoCell.h ├── REDDetailVideoCell.m ├── REDDetailViewController.h ├── REDDetailViewController.m ├── REDDetailWebsiteCell.h └── REDDetailWebsiteCell.m ├── Helpers ├── ABAnalyticsManager.h ├── ABAnalyticsManager.m ├── ABCustomIdentifierManager.h ├── ABCustomIdentifierManager.m ├── ABNotificationManager.h ├── ABNotificationManager.m ├── ABRemotelyManagedFeatures.h ├── ABRemotelyManagedFeatures.m ├── App.h ├── App.m ├── AppSchemeCoordinator.h ├── AppSchemeCoordinator.m ├── Compatibility.h ├── MarkupEngine.h ├── MarkupEngine.m ├── PhotoProcessing.h ├── PhotoProcessing.m ├── RedditAPI+Account.h ├── RedditAPI+Account.m ├── RedditAPI+Announcements.h ├── RedditAPI+Announcements.m ├── RedditAPI+Captcha.h ├── RedditAPI+Captcha.m ├── RedditAPI+Comments.h ├── RedditAPI+Comments.m ├── RedditAPI+DeprecationPatches.h ├── RedditAPI+DeprecationPatches.m ├── RedditAPI+ElementInteraction.h ├── RedditAPI+ElementInteraction.m ├── RedditAPI+HideQueue.h ├── RedditAPI+HideQueue.m ├── RedditAPI+Imgur.h ├── RedditAPI+Imgur.m ├── RedditAPI+Messages.h ├── RedditAPI+Messages.m ├── RedditAPI+Moderation.h ├── RedditAPI+Moderation.m ├── RedditAPI+OAuth.h ├── RedditAPI+OAuth.m ├── RedditAPI+Posting.h ├── RedditAPI+Posting.m ├── RedditAPI+Posts.h ├── RedditAPI+Posts.m ├── RedditAPI+Subreddits.h ├── RedditAPI+Subreddits.m ├── RedditAPI.h ├── RedditAPI.m ├── Resources.h ├── Resources.m ├── SHKConfig.h ├── SessionManager+Authentication.h ├── SessionManager+Authentication.m ├── SessionManager.h ├── SessionManager.m ├── ThumbManager+HitProtection.h ├── ThumbManager+HitProtection.m ├── ThumbManager.h └── ThumbManager.m ├── Listing ├── REDListingFooterCoordinator.h ├── REDListingFooterCoordinator.m ├── REDListingHeaderCoordinator.h ├── REDListingHeaderCoordinator.m ├── REDListingOrderToolbar.h ├── REDListingOrderToolbar.m ├── REDListingViewController+API.h ├── REDListingViewController+API.m ├── REDListingViewController+CanvasSupport.h ├── REDListingViewController+CanvasSupport.m ├── REDListingViewController+Filters.h ├── REDListingViewController+Filters.m ├── REDListingViewController+FooterSupport.h ├── REDListingViewController+FooterSupport.m ├── REDListingViewController+PopoverOptions.h ├── REDListingViewController+PopoverOptions.m ├── REDListingViewController+PostInteraction.h ├── REDListingViewController+PostInteraction.m ├── REDListingViewController+Sponsored.h ├── REDListingViewController+Sponsored.m ├── REDListingViewController+State.h ├── REDListingViewController+State.m ├── REDListingViewController.h └── REDListingViewController.m ├── Posts ├── REDPostCommentsBar.h └── REDPostCommentsBar.m ├── REDDiscoverViewController.h ├── REDDiscoverViewController.m ├── REDHomeViewController.h ├── REDHomeViewController.m ├── REDInboxViewController.h ├── REDInboxViewController.m ├── REDNavigationBar.h ├── REDNavigationBar.m ├── REDPopoutImageView.h ├── REDPopoutImageView.m ├── REDPostViewController.h ├── REDPostViewController.m ├── REDRedditAppDelegate.h ├── REDRedditAppDelegate.m ├── REDRedditMainTabBarController.h ├── REDRedditMainTabBarController.m ├── REDTabbedViewController.h ├── REDTabbedViewController.m ├── REDUserViewController.h ├── REDUserViewController.m ├── REDWebViewController.h ├── REDWebViewController.m ├── Sections ├── Browser │ ├── ABOptimalBrowserConfiguration.h │ ├── ABOptimalBrowserConfiguration.m │ ├── BrowserViewController+Legacy.h │ ├── BrowserViewController+Legacy.m │ ├── BrowserViewController+State.h │ ├── BrowserViewController+State.m │ ├── BrowserViewController.h │ ├── BrowserViewController.m │ ├── LinkShareActivityImageItemProvider.h │ ├── LinkShareActivityImageItemProvider.m │ ├── LinkShareActivityTitleItemProvider.h │ ├── LinkShareActivityTitleItemProvider.m │ ├── LinkShareCoordinator.h │ └── LinkShareCoordinator.m ├── Comments │ ├── BaseStyledTextNode+LinkThumbs.h │ ├── BaseStyledTextNode+LinkThumbs.m │ ├── BaseStyledTextNode.h │ ├── BaseStyledTextNode.m │ ├── CommenEntryToolbar.h │ ├── CommenEntryToolbar.m │ ├── Comment+API.h │ ├── Comment+API.m │ ├── Comment+Preprocess.h │ ├── Comment+Preprocess.m │ ├── Comment+Style.h │ ├── Comment+Style.m │ ├── Comment.h │ ├── Comment.m │ ├── CommentAssetSelectorView.h │ ├── CommentAssetSelectorView.m │ ├── CommentEntryCoordinator.h │ ├── CommentEntryCoordinator.m │ ├── CommentEntryTextView.h │ ├── CommentEntryTextView.m │ ├── CommentEntryView.h │ ├── CommentEntryView.m │ ├── CommentEntryViewController.h │ ├── CommentEntryViewController.m │ ├── CommentHeaderBarOverlay.h │ ├── CommentHeaderBarOverlay.m │ ├── CommentLink.h │ ├── CommentLink.m │ ├── CommentNode.h │ ├── CommentNode.m │ ├── CommentOptionsDrawerView.h │ ├── CommentOptionsDrawerView.m │ ├── CommentPostHeaderNode.h │ ├── CommentPostHeaderNode.m │ ├── CommentPostHeaderThumbnailOverlay.h │ ├── CommentPostHeaderThumbnailOverlay.m │ ├── CommentPostHeaderToolbar.h │ ├── CommentPostHeaderToolbar.m │ ├── CommentSeparatorBar.h │ ├── CommentSeparatorBar.m │ ├── CommentsViewController+API.h │ ├── CommentsViewController+API.m │ ├── CommentsViewController+Interaction.h │ ├── CommentsViewController+Interaction.m │ ├── CommentsViewController+LinkHandling.h │ ├── CommentsViewController+LinkHandling.m │ ├── CommentsViewController+NavigationBar.h │ ├── CommentsViewController+NavigationBar.m │ ├── CommentsViewController+PopoverOptions.h │ ├── CommentsViewController+PopoverOptions.m │ ├── CommentsViewController+ReplyInteraction.h │ ├── CommentsViewController+ReplyInteraction.m │ ├── CommentsViewController+State.h │ ├── CommentsViewController+State.m │ ├── CommentsViewController.h │ ├── CommentsViewController.m │ ├── FaviconOverlay.h │ ├── FaviconOverlay.m │ ├── InlineImageOverlay.h │ ├── InlineImageOverlay.m │ ├── LinkThumbsLayouts.h │ ├── LinkThumbsLayouts.m │ ├── LinkThumbsOverlay.h │ ├── LinkThumbsOverlay.m │ ├── NBaseStyledTextCell.h │ ├── NBaseStyledTextCell.m │ ├── NCenteredTextCell.h │ ├── NCenteredTextCell.m │ ├── NCommentCell.h │ ├── NCommentCell.m │ ├── NCommentPostHeaderCell.h │ ├── NCommentPostHeaderCell.m │ ├── NInlineImageCell.h │ ├── NInlineImageCell.m │ ├── NoteEntryToolbar.h │ ├── NoteEntryToolbar.m │ ├── PhoneCommentEntryDrawer.h │ ├── PhoneCommentEntryDrawer.m │ ├── PhoneCommentEntryDrawerSelectionView.h │ ├── PhoneCommentEntryDrawerSelectionView.m │ ├── PhoneCommentEntryView.h │ ├── PhoneCommentEntryView.m │ ├── PostImagePreviewOverlay.h │ ├── PostImagePreviewOverlay.m │ ├── StyledTextOverlay.h │ ├── StyledTextOverlay.m │ ├── ThreadLinesOverlay.h │ └── ThreadLinesOverlay.m ├── Discovery │ ├── DiscoveryAddController.h │ ├── DiscoveryAddController.m │ ├── DiscoveryCategory.h │ ├── DiscoveryCategory.m │ ├── DiscoverySceneController.h │ ├── DiscoverySceneController.m │ ├── NDiscoveryCategoryCell.h │ ├── NDiscoveryCategoryCell.m │ ├── NDiscoveryOptionCell.h │ ├── NDiscoveryOptionCell.m │ ├── NDiscoverySubredditCell.h │ ├── NDiscoverySubredditCell.m │ ├── Subreddit+Discovery.h │ └── Subreddit+Discovery.m ├── Messages │ ├── Message+API.h │ ├── Message+API.m │ ├── Message.h │ ├── Message.m │ ├── MessageBoxSelectionBackgroundLayer.h │ ├── MessageBoxSelectionBackgroundLayer.m │ ├── MessageBoxSelectionView.h │ ├── MessageBoxSelectionView.m │ ├── MessageBoxTabItem.h │ ├── MessageBoxTabItem.m │ ├── MessageHeaderBarOverlay.h │ ├── MessageHeaderBarOverlay.m │ ├── MessageOptionsDrawerView.h │ ├── MessageOptionsDrawerView.m │ ├── MessagesViewController+API.h │ ├── MessagesViewController+API.m │ ├── MessagesViewController+Interaction.h │ ├── MessagesViewController+Interaction.m │ ├── MessagesViewController+LinkHandling.h │ ├── MessagesViewController+LinkHandling.m │ ├── MessagesViewController.h │ ├── MessagesViewController.m │ ├── NMessageCell.h │ ├── NMessageCell.m │ ├── NMessageSectionHeaderCell.h │ ├── NMessageSectionHeaderCell.m │ ├── SendMessageViewController+Submit.h │ ├── SendMessageViewController+Submit.m │ ├── SendMessageViewController.h │ └── SendMessageViewController.m ├── Moderation │ ├── ModerationNotifyViewController.h │ ├── ModerationNotifyViewController.m │ ├── NCenteredButtonCell.h │ ├── NCenteredButtonCell.m │ ├── Template.h │ ├── Template.m │ ├── TemplateCell.h │ ├── TemplateCell.m │ ├── TemplateDetailViewController.h │ ├── TemplateDetailViewController.m │ ├── TemplateEditToolsView.h │ ├── TemplateEditToolsView.m │ ├── TemplateGroup+SampleTemplates.h │ ├── TemplateGroup+SampleTemplates.m │ ├── TemplateGroup.h │ ├── TemplateGroup.m │ ├── TemplatePrefs.h │ ├── TemplatePrefs.m │ ├── TemplateSendModeSwitchView.h │ ├── TemplateSendModeSwitchView.m │ ├── TemplateToken.h │ ├── TemplateToken.m │ ├── TemplatesViewController.h │ └── TemplatesViewController.m ├── PostCreation │ ├── AccountSelectorViewController.h │ ├── AccountSelectorViewController.m │ ├── CaptchaEntryViewController.h │ ├── CaptchaEntryViewController.m │ ├── CreatePostDetailCell.h │ ├── CreatePostDetailCell.m │ ├── CreatePostMoreOptionsCell.h │ ├── CreatePostMoreOptionsCell.m │ ├── CreatePostSubmitCell.h │ ├── CreatePostSubmitCell.m │ ├── CreatePostViewController.h │ ├── CreatePostViewController.m │ ├── ItemSelectorCell.h │ ├── ItemSelectorCell.m │ ├── ItemSelectorManualEntryCell.h │ ├── ItemSelectorManualEntryCell.m │ ├── ItemSelectorManualEntryNode.h │ ├── ItemSelectorManualEntryNode.m │ ├── ItemSelectorNode.h │ ├── ItemSelectorNode.m │ ├── ItemSelectorViewController.h │ ├── ItemSelectorViewController.m │ ├── PhotoUploadViewController.h │ ├── PhotoUploadViewController.m │ ├── PostDetailNode.h │ ├── PostDetailNode.m │ ├── SubredditSelectorViewController.h │ └── SubredditSelectorViewController.m ├── Posts │ ├── CanvasPreviewDemo.h │ ├── CanvasPreviewDemo.m │ ├── GalleryViewController.h │ ├── GalleryViewController.m │ ├── LoadMoreSliderTrack.h │ ├── LoadMoreSliderTrack.m │ ├── MPNativeAd+ABAdditionalImpressionTracking.h │ ├── MPNativeAd+ABAdditionalImpressionTracking.m │ ├── MoPubCompatibleOutlineView.h │ ├── MoPubCompatibleOutlineView.m │ ├── ModButtonOverlay.h │ ├── ModButtonOverlay.m │ ├── NPostCell.h │ ├── NPostCell.m │ ├── Post+API.h │ ├── Post+API.m │ ├── Post+Sponsored.h │ ├── Post+Sponsored.m │ ├── Post+Style.h │ ├── Post+Style.m │ ├── Post.h │ ├── Post.m │ ├── PostModerationControlView.h │ ├── PostModerationControlView.m │ ├── PostOptionsDrawerView.h │ ├── PostOptionsDrawerView.m │ ├── PostsFooterCoordinator.h │ ├── PostsFooterCoordinator.m │ ├── PostsHeaderCoordinator.h │ ├── PostsHeaderCoordinator.m │ ├── PostsNavigationTitleView.h │ ├── PostsNavigationTitleView.m │ ├── PostsOrderToolbar.h │ ├── PostsOrderToolbar.m │ ├── PostsShowMoreButton.h │ ├── PostsShowMoreButton.m │ ├── PostsTableCoordinator.h │ ├── PostsViewController+API.h │ ├── PostsViewController+API.m │ ├── PostsViewController+CanvasSupport.h │ ├── PostsViewController+CanvasSupport.m │ ├── PostsViewController+Filters.h │ ├── PostsViewController+Filters.m │ ├── PostsViewController+FooterSupport.h │ ├── PostsViewController+FooterSupport.m │ ├── PostsViewController+PopoverOptions.h │ ├── PostsViewController+PopoverOptions.m │ ├── PostsViewController+PostInteraction.h │ ├── PostsViewController+PostInteraction.m │ ├── PostsViewController+Sponsored.h │ ├── PostsViewController+Sponsored.m │ ├── PostsViewController+State.h │ ├── PostsViewController+State.m │ ├── PostsViewController.h │ ├── PostsViewController.m │ ├── RedditAlienDrawing.h │ ├── RedditAlienDrawing.m │ ├── SponsoredPostCell.h │ ├── SponsoredPostCell.m │ ├── ThumbOverlay.h │ ├── ThumbOverlay.m │ ├── VotableElement+ModTools.h │ ├── VotableElement+ModTools.m │ ├── VotableElement.h │ ├── VotableElement.m │ ├── VoteOverlay.h │ └── VoteOverlay.m ├── Reddits │ ├── FolderChangeTrackRecord.h │ ├── FolderChangeTrackRecord.m │ ├── FoldersViewController+EditSupport.h │ ├── FoldersViewController+EditSupport.m │ ├── FoldersViewController.h │ ├── FoldersViewController.m │ ├── MultiSubredditSelectorViewController.h │ ├── MultiSubredditSelectorViewController.m │ ├── NBaseOptionCell.h │ ├── NBaseOptionCell.m │ ├── NMyRedditInfoCell.h │ ├── NMyRedditInfoCell.m │ ├── NSectionSpacerCell.h │ ├── NSectionSpacerCell.m │ ├── NSectionTitleCell.h │ ├── NSectionTitleCell.m │ ├── NSubredditCell.h │ ├── NSubredditCell.m │ ├── NSubredditFolderCell.h │ ├── NSubredditFolderCell.m │ ├── RedditAddController.h │ ├── RedditAddController.m │ ├── RedditsViewController+Announcement.h │ ├── RedditsViewController+Announcement.m │ ├── RedditsViewController+Discovery.h │ ├── RedditsViewController+Discovery.m │ ├── RedditsViewController+EditSupport.h │ ├── RedditsViewController+EditSupport.m │ ├── RedditsViewController+MyRedditInfo.h │ ├── RedditsViewController+MyRedditInfo.m │ ├── RedditsViewController+Subscriptions.h │ ├── RedditsViewController+Subscriptions.m │ ├── RedditsViewController.h │ ├── RedditsViewController.m │ ├── Subreddit+API.h │ ├── Subreddit+API.m │ ├── Subreddit+Moderation.h │ ├── Subreddit+Moderation.m │ ├── Subreddit.h │ ├── Subreddit.m │ ├── SubredditFolder.h │ ├── SubredditFolder.m │ ├── SubredditSidebarViewController.h │ ├── SubredditSidebarViewController.m │ ├── UserSubredditPreferences.h │ └── UserSubredditPreferences.m └── Settings │ ├── ABGlobalNotificationKeys.h │ ├── ABSettings.h │ ├── ABSettings.m │ ├── ABShareConfigurator.h │ ├── ABShareConfigurator.m │ ├── Announcement.h │ ├── Announcement.m │ ├── AnnouncementTextCell.h │ ├── AnnouncementTextCell.m │ ├── AnnouncementViewController.h │ ├── AnnouncementViewController.m │ ├── EULAViewController.h │ ├── EULAViewController.m │ ├── ImgurManagerController.h │ ├── ImgurManagerController.m │ ├── ImgurManagerTableController.h │ ├── ImgurManagerTableController.m │ ├── ImgurUploadCell.h │ ├── ImgurUploadCell.m │ ├── ImgurUploadRecord.h │ ├── ImgurUploadRecord.m │ ├── JMEnumMapConfiguration.h │ ├── LegacySettingsTableViewController+LegacyDataSource.h │ ├── LegacySettingsTableViewController+LegacyDataSource.m │ ├── LegacySettingsTableViewController.h │ ├── LegacySettingsTableViewController.m │ ├── ScreenLockSettings.h │ ├── ScreenLockSettings.m │ ├── SettingsViewController.h │ └── SettingsViewController.m ├── Util ├── REDColor.h ├── REDColor.m ├── REDTodoPrompt.h └── REDTodoPrompt.m ├── iPad ├── AppDelegate_iPad.h ├── AppDelegate_iPad.m ├── BrowserFooterView_iPad.h ├── BrowserFooterView_iPad.m ├── BrowserHeaderView_iPad.h ├── BrowserHeaderView_iPad.m ├── BrowserViewController_iPad+OptimalImage.h ├── BrowserViewController_iPad+OptimalImage.m ├── BrowserViewController_iPad.h ├── BrowserViewController_iPad.m ├── CommentAddSeparatorCell_iPad.h ├── CommentAddSeparatorCell_iPad.m ├── CommentPostHeaderToolbar_iPad.h ├── CommentPostHeaderToolbar_iPad.m ├── CommentsHeaderView_iPad.h ├── CommentsHeaderView_iPad.m ├── CommentsViewController_iPad.h ├── CommentsViewController_iPad.m ├── ContentHeaderView_iPad.h ├── ContentHeaderView_iPad.m ├── DiscoveryAddController_iPad.h ├── DiscoveryAddController_iPad.m ├── DiscoveryHeaderView_iPad.h ├── DiscoveryHeaderView_iPad.m ├── DiscoverySceneController_iPad.h ├── DiscoverySceneController_iPad.m ├── FullScreenPhotoViewer_iPad.h ├── FullScreenPhotoViewer_iPad.m ├── FullscreenGalleryController_iPad.h ├── FullscreenGalleryController_iPad.m ├── GalleryViewController_iPad.h ├── GalleryViewController_iPad.m ├── GestureTutorialViewController.h ├── GestureTutorialViewController.m ├── JMViewOverlay+NavigationButton.h ├── JMViewOverlay+NavigationButton.m ├── LoginPasswordController_iPad.h ├── LoginPasswordController_iPad.m ├── MessagesViewController_iPad.h ├── MessagesViewController_iPad.m ├── NCommentCell_iPad.h ├── NCommentCell_iPad.m ├── NCommentPostHeaderCell_iPad.h ├── NCommentPostHeaderCell_iPad.m ├── NPostCell_iPad.h ├── NPostCell_iPad.m ├── NavigationBar_iPad.h ├── NavigationBar_iPad.m ├── NavigationManager_iPad.h ├── NavigationManager_iPad.m ├── NotificationBar.h ├── NotificationBar.m ├── OptionCellView_iPad.h ├── OptionCellView_iPad.m ├── PortraitTipViewController.h ├── PortraitTipViewController.m ├── Post+Style_iPad.h ├── Post+Style_iPad.m ├── PostsHeaderView_iPad.h ├── PostsHeaderView_iPad.m ├── PostsNavigation_iPad.h ├── PostsNavigation_iPad.m ├── PostsViewController_iPad.h ├── PostsViewController_iPad.m ├── RedditAddController_iPad.h ├── RedditAddController_iPad.m ├── RedditsFooterView_iPad.h ├── RedditsFooterView_iPad.m ├── RedditsHeaderView_iPad.h ├── RedditsHeaderView_iPad.m ├── RedditsViewController_iPad.h ├── RedditsViewController_iPad.m ├── SettingsViewController_iPad.h ├── SettingsViewController_iPad.m ├── SidePaneBezelButton.h ├── SidePaneBezelButton.m ├── SidePane_iPad.h ├── SidePane_iPad.m ├── SlidingDragReleaseProtocol.h ├── SponsoredPostCell_iPad.h ├── SponsoredPostCell_iPad.m ├── SubredditSidebarViewController_iPad.h ├── SubredditSidebarViewController_iPad.m ├── UserDetailsViewController_iPad.h └── UserDetailsViewController_iPad.m ├── iPhone ├── ABCustomOutlineNavigationBar.h ├── ABCustomOutlineNavigationBar.m ├── BrowserNavigationBar.h ├── BrowserNavigationBar.m ├── BrowserViewController_iPhone.h ├── BrowserViewController_iPhone.m ├── CommentsNavigationBar.h ├── CommentsNavigationBar.m ├── CommentsViewController_iPhone.h ├── CommentsViewController_iPhone.m ├── GalleryViewController_iPhone.h ├── GalleryViewController_iPhone.m ├── GenericNavigationBar.h ├── GenericNavigationBar.m ├── HomeNavigationBar.h ├── HomeNavigationBar.m ├── MessagesNavigationBar.h ├── MessagesNavigationBar.m ├── NPostCell_iPhone.h ├── NPostCell_iPhone.m ├── NavigationBackItemView.h ├── NavigationBackItemView.m ├── Post+Style_iPhone.h ├── Post+Style_iPhone.m ├── PostsNavigationBar.h ├── PostsNavigationBar.m ├── RedditsViewController_iPhone.h ├── RedditsViewController_iPhone.m ├── SlideableNavigationEdgeView.h └── SlideableNavigationEdgeView.m └── main.m /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -crlf -diff -merge 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # xcode noise 2 | *.mode1v3 3 | *.pbxuser 4 | *.perspective 5 | *.perspectivev3 6 | *.pyc 7 | *~.nib/ 8 | build/* 9 | .idea/* 10 | 11 | *.xcuserdatad 12 | 13 | 14 | # Textmate - if you build your xcode projects with it 15 | *.tm_build_errors 16 | 17 | # old skool 18 | .svn 19 | 20 | # osx noise 21 | .DS_Store 22 | profile 23 | 24 | Podfile.lock 25 | _old_Podfile 26 | _old_Pods/ 27 | _Pods/ 28 | 29 | tests/automation/*.trace 30 | AlienBlue.xcworkspace/xcshareddata/ 31 | AlienBlue.xcodeproj/project.xcworkspace/ 32 | -------------------------------------------------------------------------------- /Source/ABDeprecatedMethods.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABDeprecatedMethods.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 13/11/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @protocol ABDeprecatedMethods 13 | 14 | - (void)setStatusBarHidden:(BOOL)hidden animated:(BOOL)animated; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Additional/ScreenLockViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenLockViewController.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 28/09/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NavigationManager.h" 11 | 12 | @interface ScreenLockViewController : UIViewController 13 | { 14 | IBOutlet UITextField * lockTextField; 15 | } 16 | 17 | @property (nonatomic, strong) IBOutlet UITextField *lockTextField; 18 | @property (nonatomic, strong) IBOutlet UIImageView *lockImageView; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Additional/SplashView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SplashView : UIView 4 | 5 | + (void)show; 6 | + (void)hide; 7 | + (UIView *) viewToAttach; 8 | + (void)bringSplashToFront; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Additional/UserDetailsViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | 3 | @interface UserDetailsViewController : ABOutlineViewController 4 | @property (strong, readonly) NSString *username; 5 | - (id)initWithUsername:(NSString *)username; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSArray+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (ABAdditions) 12 | 13 | - (NSArray *)limitToLength:(NSUInteger)len; 14 | 15 | - (BOOL)matchesStringContentsInArray:(NSArray *)array; 16 | 17 | - (id)safeObjectAtIndex:(NSUInteger)ind; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSAttributedString+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSAttributedString (ABAdditions) 12 | 13 | - (CGFloat)heightConstrainedToWidth:(CGFloat)width; 14 | 15 | - (void)drawInRect:(CGRect)rect; 16 | - (void)drawCenteredVerticallyInRect:(CGRect)bounds; 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSDate+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate (ABAdditions) 12 | - (BOOL)isEarlierThanDate:(NSDate *)date; 13 | - (BOOL)isLaterThanDate:(NSDate *)date; 14 | - (BOOL)isSameAsDate:(NSDate *)date; 15 | + (NSDate *)latestOfDate:(NSDate *)date1 date:(NSDate *)date2; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSDate+ABAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+ABAdditions.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSDate+ABAdditions.h" 10 | 11 | @implementation NSDate (ABAdditions) 12 | 13 | - (BOOL)isEarlierThanDate:(NSDate *)date; 14 | { 15 | return [self compare:date] == NSOrderedAscending; 16 | } 17 | 18 | - (BOOL)isLaterThanDate:(NSDate *)date; 19 | { 20 | return [self compare:date] == NSOrderedDescending; 21 | } 22 | 23 | - (BOOL)isSameAsDate:(NSDate *)date; 24 | { 25 | return [self compare:date] == NSOrderedSame; 26 | } 27 | 28 | + (NSDate *)latestOfDate:(NSDate *)date1 date:(NSDate *)date2; 29 | { 30 | if ([date1 isLaterThanDate:date2]) 31 | return date1; 32 | else 33 | return date2; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSDictionary+UrlEncoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+UrlEncoding.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 11/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (UrlEncoding) 12 | - (NSString *)urlEncodedString; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSMutableArray+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableArray+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableArray (ABAdditions) 12 | 13 | - (void)addUniqueStringObject:(NSString *)uniqueStr; 14 | - (void)addUniqueStringObjectsFromArray:(NSArray *)array; 15 | - (void)sortAlphabetically; 16 | - (void)sortDescending; 17 | - (void)reduceToLast:(NSUInteger)amt; 18 | - (void)safeInsertObject:(id)object atIndex:(NSUInteger)ind; 19 | 20 | - (void)moveObject:(id)object toIndex:(NSUInteger)toIndex; 21 | - (void)moveObjectFromIndex:(NSUInteger)from toIndex:(NSUInteger)toIndex; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSMutableAttributedString+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableAttributedString (ABAdditions) 12 | 13 | - (void)applyAttribute:(NSString *)attributeName value:(id)value toString:(NSString *)string; 14 | - (void)applyAttribute:(NSString *)attributeName value:(id)value; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSMutableAttributedString+ABAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+ABAdditions.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSMutableAttributedString+ABAdditions.h" 10 | 11 | @implementation NSMutableAttributedString (ABAdditions) 12 | 13 | - (void)applyAttribute:(NSString *)attributeName value:(id)value toString:(NSString *)string 14 | { 15 | NSRange range = [self.string rangeOfString:string]; 16 | [self addAttribute:attributeName value:value range:range]; 17 | } 18 | 19 | - (void)applyAttribute:(NSString *)attributeName value:(id)value; 20 | { 21 | NSRange range = NSMakeRange(0, self.length); 22 | [self addAttribute:attributeName value:value range:range]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSMutableString+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableString (ABAdditions) 12 | 13 | - (void)replaceString:(NSString *)sStr withString:(NSString *)rStr; 14 | - (void)removeOccurrencesOfString:(NSString *)str; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSMutableString+ABAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableString+ABAdditions.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSMutableString+ABAdditions.h" 10 | 11 | @implementation NSMutableString (ABAdditions) 12 | 13 | - (void)replaceString:(NSString *)sStr withString:(NSString *)rStr; 14 | { 15 | if (!sStr) 16 | return; 17 | 18 | if (!rStr) 19 | return; 20 | 21 | [self replaceOccurrencesOfString:sStr withString:rStr options:NSCaseInsensitiveSearch range:NSMakeRange(0, self.length)]; 22 | } 23 | 24 | - (void)removeOccurrencesOfString:(NSString *)str 25 | { 26 | [self replaceString:str withString:@""]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSString+ABLegacyLinkTypes.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // todo: these methods are really old and coded poorly and will need 4 | // to be re-written or discarded. They're included here for the time 5 | // being as some parts of the app still rely on them, until I get a chance 6 | // to refactor 7 | @interface NSString (ABLegacyLinkTypes) 8 | + (NSString *)ab_useTinyResImgurVersion:(NSString *)link; 9 | + (NSString *)ab_useMediumThumbnailImgurVersion:(NSString *)link; 10 | + (NSString *)ab_useLowResImgurVersion:(NSString *)link; 11 | + (NSString *)ab_fixImgurLink:(NSString *)url; 12 | + (NSString *)ab_fixImgurLinkForCanvas:(NSString *)url; 13 | + (NSString *)ab_getLinkType:(NSString *)url; 14 | + (BOOL)ab_isSelfLink:(NSString *)link; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSString+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Base64.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 29/11/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSData+Base64.h" 11 | 12 | @interface NSString (Base64) 13 | + (NSString *)base64FromString:(NSString *)plain; 14 | + (NSString *)decodeBase64String:(NSString *)encoded; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSString+Base64.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Base64.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 29/11/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSString+Base64.h" 10 | #import "QSUtilities.h" 11 | #import "NSData+Base64.h" 12 | 13 | @implementation NSString (Base64) 14 | 15 | + (NSString *)base64FromString:(NSString *)plain; 16 | { 17 | NSString *b64 = [QSStrings encodeBase64WithString:plain]; 18 | return b64; 19 | } 20 | 21 | + (NSString *)decodeBase64String:(NSString *)encoded; 22 | { 23 | NSData *decodedData = [NSData dataWithBase64EncodedString:encoded]; 24 | NSString *decoded = [[NSString alloc] initWithData:decodedData encoding:NSUTF8StringEncoding]; 25 | return decoded; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HTML.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 20/11/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface NSString (HTML) 14 | - (NSString *)stringByDecodingHTMLEntities; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Additions/NSString+HTML.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HTML.m 3 | // AlienBlue 4 | // 5 | // Created by JM on 20/11/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSString+HTML.h" 10 | #import "GTMNSString+HTML.h" 11 | 12 | @implementation NSString (HTML) 13 | 14 | - (NSString *)stringByDecodingHTMLEntities { 15 | return [NSString stringWithString:[self gtm_stringByUnescapingFromHTML]]; // gtm_stringByUnescapingFromHTML can return self so create new string ;) 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIApplication+ABAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UIApplication (ABAdditions) 4 | 5 | + (void)ab_updateStatusBarTint; 6 | + (void)ab_updateStatusBarTintWithTransition; 7 | 8 | + (void)ab_enableEdgePanning; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIBezierPath+Shapes.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBezierPath+Shapes.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIBezierPath (Shapes) 12 | + (UIBezierPath *)bezierPathWithTriangleCenter:(CGPoint)center sideLength:(CGFloat)length angle:(CGFloat)angle; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIFont+Skin.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+Skin.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ABBundleManager.h" 11 | 12 | @interface UIFont (Skin) 13 | 14 | + (UIFont *)skinFontWithName:(NSString *)name; 15 | + (CTFontRef)skinFontRefWithName:(NSString *)name; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIFont+Skin.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+Skin.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "UIFont+Skin.h" 10 | 11 | @implementation UIFont (Skin) 12 | 13 | + (UIFont *)skinFontWithName:(NSString *)name; 14 | { 15 | return [[ABBundleManager sharedManager] fontForKey:name]; 16 | } 17 | 18 | + (CTFontRef)skinFontRefWithName:(NSString *)name; 19 | { 20 | return [[ABBundleManager sharedManager] fontRefForKey:name]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImage+ABAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UIImage (ABAdditions) 4 | 5 | + (UIImage *)etchedImageFromImage:(UIImage *)image fillColor:(UIColor *)fillColor; 6 | + (UIImage *)etchedImageFromImage:(UIImage *)image shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)shadowOffset fillColor:(UIColor *)fillColor; 7 | 8 | - (UIImage *)jm_resizeable; 9 | - (UIImage *)jm_resizableImageWithCapInsets:(UIEdgeInsets)capInsets resizingMode:(UIImageResizingMode)resizingMode; 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImage+ABDiskCache.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UIImage (ABDiskCache) 4 | 5 | + (UIImage *)ab_diskCachedImageForKey:(NSString *)url; 6 | + (void)ab_removeDiskCachedImageForKey:(NSString *)url; 7 | + (void)ab_setDiskCachedImage:(UIImage *)image forKey:(NSString *)url; 8 | 9 | + (UIImage *)ab_diskCachedImageForKey:(NSString *)cacheKey permanentStorage:(BOOL)isPermanentStorage; 10 | + (void)ab_setDiskCachedImage:(UIImage *)image forKey:(NSString *)cacheKey permanentStorage:(BOOL)isPermanentStorage; 11 | + (void)ab_removeDiskCachedImageForKey:(NSString *)cacheKey permanentStorage:(BOOL)isPermanentStorage; 12 | 13 | - (void)log; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImage+Alpha.h: -------------------------------------------------------------------------------- 1 | // UIImage+Alpha.h 2 | // Created by Trevor Harmon on 9/20/09. 3 | // Free for personal or commercial use, with or without modification. 4 | // No warranty is expressed or implied. 5 | 6 | // Helper methods for adding an alpha layer to an image 7 | @interface UIImage (Alpha) 8 | - (BOOL)hasAlpha; 9 | - (UIImage *)imageWithAlpha; 10 | - (UIImage *)transparentBorderImage:(NSUInteger)borderSize; 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImage+Assets.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Assets.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 15/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (Assets) 12 | 13 | + (UIImage *)gradientBackground; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImage+RoundedCorner.h: -------------------------------------------------------------------------------- 1 | // UIImage+RoundedCorner.h 2 | // Created by Trevor Harmon on 9/20/09. 3 | // Free for personal or commercial use, with or without modification. 4 | // No warranty is expressed or implied. 5 | 6 | // Extends the UIImage class to support making rounded corners 7 | @interface UIImage (RoundedCorner) 8 | - (UIImage *)roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize; 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImageView+JMAFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+UIImageView_JMAFNetworking.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | #ifndef AlienBlue_AFImageCacheAccess 13 | #define AlienBlue_AFImageCacheAccess 14 | @interface AFImageCache : NSCache 15 | @end 16 | #endif 17 | 18 | @interface AFImageCache (JMAFNetworking) 19 | + (AFImageCache *)sharedImageCache; 20 | @end 21 | 22 | @interface UIImageView (AFImageCache) 23 | + (AFImageCache *)afImageCache; 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIImageView+JMAFNetworking.m: -------------------------------------------------------------------------------- 1 | 2 | // Created to expose AFImageCache 3 | #import "UIImageView+JMAFNetworking.h" 4 | #import "UIImageView+AFNetworking.h" 5 | 6 | @interface UIImageView (_JMAFNetworking) 7 | + (AFImageCache *)af_sharedImageCache; 8 | @end 9 | 10 | @implementation AFImageCache (JMAFNetworking) 11 | + (AFImageCache *)sharedImageCache; 12 | { 13 | return [UIImageView afImageCache]; 14 | } 15 | @end 16 | 17 | 18 | @implementation UIImageView (JMAFNetworking) 19 | 20 | 21 | + (AFImageCache *)afImageCache; 22 | { 23 | return [UIImageView af_sharedImageCache]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Common/Additions/UINavigationBar+ABStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationBar+ABStyle.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 29/12/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UINavigationBar (UINavigationBar_ABStyle) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Common/Additions/UINavigationController+ABAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+ABAdditions.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 2/12/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UINavigationController (ABAdditions) 12 | 13 | + (BOOL)ab_shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; 14 | + (BOOL)ab_shouldAutorotate; 15 | + (NSUInteger)ab_supportedInterfaceOrientations; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Common/Additions/UITableViewCell+Transparency.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UITableViewCell (Transparency) 4 | - (void)makeTransparent; 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Additions/UITableViewCell+Transparency.m: -------------------------------------------------------------------------------- 1 | #import "UITableViewCell+Transparency.h" 2 | 3 | @implementation UITableViewCell (Transparency) 4 | 5 | - (void)makeTransparent; 6 | { 7 | self.opaque = NO; 8 | self.contentView.backgroundColor = [UIColor clearColor]; 9 | self.backgroundColor = [UIColor clearColor]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Common/Additions/UIViewController+Additions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ABActionMenuHost; 4 | @interface UIViewController (Additions) 5 | 6 | @property (weak) ABActionMenuHost *relatedActionMenuHost; 7 | @property CGSize ab_contentSizeForViewInPopover; 8 | 9 | - (BOOL)isModal; 10 | - (void)setNavbarTitle:(NSString *)title; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Common/AppDelegate/AlienBlueAppDelegate+UAT.h: -------------------------------------------------------------------------------- 1 | #import "AlienBlueAppDelegate.h" 2 | 3 | @interface AlienBlueAppDelegate (UAT) 4 | 5 | - (void)enableAcceptanceTestingIfNecessary; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/AppDelegate/AlienBlueAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlienBlueAppDelegate.h 3 | // Alien Blue :: http://alienblue.org 4 | // 5 | // Created by Jason Morrissey on 28/03/10. 6 | // Copyright The Design Shed 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NavigationManager.h" 11 | 12 | @interface AlienBlueAppDelegate : NSObject 13 | { 14 | UIBackgroundTaskIdentifier backgroundTask; 15 | } 16 | 17 | @property (nonatomic, strong) UIWindow *window; 18 | @property (nonatomic, strong) NavigationManager *navigationManager; 19 | @property (readonly) BOOL isActiveInForeground; 20 | 21 | - (void)proVersionUpgraded; 22 | - (void)stopPurchaseIndicator; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Common/AppDelegate/ReachabilityCoordinator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ReachabilityCoordinator : NSObject 4 | @property (readonly) BOOL isReachable; 5 | @property (readonly) NSString *statusSummary; 6 | - (void)startMonitoringReachability; 7 | - (void)handleApplicationBecomingActiveDoWhenReachable:(JMAction)onReachableAction; 8 | - (void)handleApplicationBecomingInactive; 9 | + (ReachabilityCoordinator *)shared; 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Compatibility/AFURLConnectionOperation+JMOutputStreamFlush.h: -------------------------------------------------------------------------------- 1 | #import "AFURLConnectionOperation.h" 2 | 3 | @interface AFURLConnectionOperation (JMOutputStreamFlush) 4 | 5 | - (void)flushOutputStream; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Compatibility/AFURLConnectionOperation+JMOutputStreamFlush.m: -------------------------------------------------------------------------------- 1 | #import "AFURLConnectionOperation+JMOutputStreamFlush.h" 2 | 3 | @implementation AFURLConnectionOperation (JMOutputStreamFlush) 4 | 5 | - (void)flushOutputStream; 6 | { 7 | if (!self.outputStream) 8 | return; 9 | 10 | [self.outputStream close]; 11 | NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; 12 | for (NSString *runLoopMode in self.runLoopModes) { 13 | [self.outputStream removeFromRunLoop:runLoop forMode:runLoopMode]; 14 | } 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Common/Events/ABDataEvent.h: -------------------------------------------------------------------------------- 1 | // ABDataEvent.h 2 | // AlienBlue 3 | 4 | #import 5 | 6 | @interface ABDataEvent : PURBufferedOutput 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuFavoriteLinkEditPanel.h: -------------------------------------------------------------------------------- 1 | #import "JMActionMenuCustomEditPanel.h" 2 | 3 | @interface ABActionMenuFavoriteLinkEditPanel : JMActionMenuCustomEditPanel 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuHost.h: -------------------------------------------------------------------------------- 1 | #import "JMActionMenuView.h" 2 | 3 | @class ABCustomOutlineNavigationBar; 4 | 5 | @interface ABActionMenuHost : NSObject 6 | @property (strong, readonly) JMActionMenuView *actionMenuView; 7 | @property (weak, readonly) UIViewController *parentController; 8 | @property (readonly) NSString *friendlyName; 9 | @property (readonly) ABCustomOutlineNavigationBar *customNavigationBar; 10 | + (ABActionMenuHost *)actionMenuHostForViewController:(UIViewController *)viewController; 11 | - (void)updateCustomNavigationBar; 12 | - (Class)classForCustomNavigationBar; 13 | - (void)willAttachCustomNavigationBar:(ABCustomOutlineNavigationBar *)customNavigationBar; 14 | 15 | - (void)updateActionMenuBadges; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuKarmaEditPanel.h: -------------------------------------------------------------------------------- 1 | #import "JMActionMenuCustomEditPanel.h" 2 | 3 | @interface ABActionMenuKarmaEditPanel : JMActionMenuCustomEditPanel 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuKarmaStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ABActionMenuKarmaStatistics : NSObject 4 | + (ABActionMenuKarmaStatistics *)karmaStatistics; 5 | - (NSAttributedString *)attributedStringBasedOnLatestStatsShouldTruncate:(BOOL)shouldTruncate; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuThemeConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "JMActionMenuThemeConfiguration.h" 2 | 3 | @interface ABActionMenuThemeConfiguration : JMActionMenuThemeConfiguration 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuWatchedCommentStatistics.h: -------------------------------------------------------------------------------- 1 | #import "ABActionMenuWatchedPostStatistics.h" 2 | #import "Message.h" 3 | 4 | @interface ABActionMenuWatchedCommentStatistics : ABActionMenuWatchedPostStatistics 5 | 6 | + (ABActionMenuWatchedCommentStatistics *)lastSubmittedCommentStats; 7 | - (void)updateBasedOnReceivedMessageComment:(Message *)messageComment; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABActionMenuWatchedPostEditPanel.h: -------------------------------------------------------------------------------- 1 | #import "JMActionMenuCustomEditPanel.h" 2 | 3 | @interface ABActionMenuWatchedPostEditPanel : JMActionMenuCustomEditPanel 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "CustomNavigationBar.h" 2 | 3 | @interface ABNavigationBar : CustomNavigationBar 4 | 5 | - (void)makeDark; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABNavigationController.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 29/12/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "CustomNavigationController.h" 12 | 13 | @interface ABNavigationController : CustomNavigationController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABPlaceholderNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABPlaceholderNavigationController.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 3/09/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ABPlaceholderNavigationController : UINavigationController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABPlaceholderNavigationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ABPlaceholderNavigationController.m 3 | // AlienBlue 4 | // 5 | // Created by JM on 3/09/13. 6 | // 7 | // 8 | 9 | #import "ABPlaceholderNavigationController.h" 10 | #import "UINavigationController+ABAdditions.h" 11 | 12 | @interface ABPlaceholderNavigationController () 13 | 14 | @end 15 | 16 | @implementation ABPlaceholderNavigationController 17 | 18 | - (BOOL)shouldAutorotate; 19 | { 20 | // fix for iOS 7 status bar showing up on the side when launching in landscape 21 | return JMIsIphone() ? NO : YES; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABTableView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ABTableView : UITableView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABTableView.m: -------------------------------------------------------------------------------- 1 | #import "ABTableView.h" 2 | #import "UIView+Additions.h" 3 | #import "Resources.h" 4 | 5 | @implementation ABTableView 6 | 7 | - (id)initWithCoder:(NSCoder *)aDecoder; 8 | { 9 | self = [super initWithCoder:aDecoder]; 10 | if (self) 11 | { 12 | } 13 | return self; 14 | } 15 | 16 | - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation; 17 | { 18 | if (!JMIsIOS7()) 19 | { 20 | [super reloadRowsAtIndexPaths:indexPaths withRowAnimation:animation]; 21 | return; 22 | } 23 | 24 | // patch for internal iOS 7 animation memory leak 25 | [UIView beginAnimations:nil context:nil]; 26 | [super reloadRowsAtIndexPaths:indexPaths withRowAnimation:animation]; 27 | [UIView commitAnimations]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ABToolbar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ABToolbar : UIToolbar 4 | 5 | - (void)registerForNotifications; 6 | - (void)handleTintSwitch; 7 | 8 | - (void)setShowsRibbon:(BOOL)showsRibbon; 9 | - (void)setShowsUpArrow:(BOOL)showsUpArrow; 10 | 11 | - (void)setToolbarBackgroundColor:(UIColor *)toolbarBackgroundColor; 12 | 13 | @property (readonly) UIImageView *jmShadowImageView; 14 | @property (readonly) UIImageView *upArrowImageView; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Source/Common/Navigation/ActionMenuManager.h: -------------------------------------------------------------------------------- 1 | #import "PostsNavigation.h" 2 | 3 | @interface ActionMenuManager : NSObject 4 | 5 | @property (strong, readonly) ABActionMenuHost *currentMenuHost; 6 | 7 | - (void)updateForPostsNavigationController:(PostsNavigation *)postsNavigationController; 8 | - (void)postsNavigationController:(PostsNavigation *)postsNavigation willShowViewController:(UIViewController *)viewController; 9 | - (void)postsNavigationController:(PostsNavigation *)postsNavigation didShowViewController:(UIViewController *)viewController; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Common/Navigation/BrowserActionMenuHost.h: -------------------------------------------------------------------------------- 1 | #import "ABActionMenuHost.h" 2 | 3 | @interface BrowserActionMenuHost : ABActionMenuHost 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/CommentsActionMenuHost.h: -------------------------------------------------------------------------------- 1 | #import "ABActionMenuHost.h" 2 | 3 | @interface CommentsActionMenuHost : ABActionMenuHost 4 | 5 | + (JMActionMenuNode *)generateContentUpvoteNode; 6 | + (JMActionMenuNode *)generateContentDownvoteNode; 7 | + (JMActionMenuNode *)generateContentSaveNode; 8 | + (JMActionMenuNode *)generateContentHideNode; 9 | + (JMActionMenuNode *)generateContentReportNode; 10 | 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Common/Navigation/HomeActionMenuHost.h: -------------------------------------------------------------------------------- 1 | #import "ABActionMenuHost.h" 2 | 3 | @interface HomeActionMenuHost : ABActionMenuHost 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/HomeActionMenuHost.m: -------------------------------------------------------------------------------- 1 | #import "HomeActionMenuHost.h" 2 | #import "RedditsViewController.h" 3 | #import "HomeNavigationBar.h" 4 | 5 | @interface HomeActionMenuHost() 6 | @property (readonly) RedditsViewController *redditsViewController; 7 | @end 8 | 9 | @implementation HomeActionMenuHost 10 | 11 | - (Class)classForCustomNavigationBar; 12 | { 13 | return [HomeNavigationBar class]; 14 | } 15 | 16 | - (NSString *)friendlyName; 17 | { 18 | return @"reddit"; 19 | } 20 | 21 | - (RedditsViewController *)redditsViewController; 22 | { 23 | return (RedditsViewController *)self.parentController; 24 | } 25 | 26 | - (NSArray *)generateScreenSpecificActionMenuNodes; 27 | { 28 | return [NSArray new]; 29 | } 30 | 31 | - (void)willAttachCustomNavigationBar:(ABCustomOutlineNavigationBar *)customNavigationBar; 32 | { 33 | [super willAttachCustomNavigationBar:customNavigationBar]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Source/Common/Navigation/NavigationManager+Deprecated.h: -------------------------------------------------------------------------------- 1 | #import "NavigationManager.h" 2 | 3 | @interface NavigationManager (Deprecated) 4 | @property (readonly) BOOL deprecated_isFullscreen; 5 | @property (nonatomic, strong) NSMutableDictionary *deprecated_legacyPostDictionary; 6 | - (void)deprecated_drawIphoneVotingItems; 7 | - (void)deprecated_drawIphoneBottomToolbarItems; 8 | - (void)deprecated_handleFullscreenWillShowViewControllerAdjustments; 9 | - (void)deprecated_handleFullscreenAdjustmentsAfterRotationIfNecessary; 10 | - (void)deprecated_exitFullscreenMode; 11 | - (void)deprecated_exitFullscreenAnimated:(BOOL)animated; 12 | - (void)deprecated_toggleFullscreen; 13 | - (void)deprecated_applyNightSwitchGestureRecognizer; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Common/Navigation/NavigationStateCoordinator.h: -------------------------------------------------------------------------------- 1 | @class NavigationManager; 2 | 3 | @interface NavigationStateCoordinator : NSObject 4 | 5 | - (id)initWithParentNavigationManager:(NavigationManager *)parentNavigationManager; 6 | - (void)saveState; 7 | - (void)restoreState; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Common/Navigation/PostsActionMenuHost.h: -------------------------------------------------------------------------------- 1 | #import "ABActionMenuHost.h" 2 | 3 | @interface PostsActionMenuHost : ABActionMenuHost 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/Navigation/PostsNavigation.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsNavigation.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 5/09/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RedditAPI.h" 11 | #import "ABNavigationController.h" 12 | #import "JMSlideableNavigation.h" 13 | 14 | @interface PostsNavigation : JMSlideableNavigationController 15 | { 16 | } 17 | 18 | // fixes an iOS 7 related issue that occurs when another push/pop call is made 19 | // during an existing push/pop animation 20 | @property BOOL shouldSuppressPushingOrPopping; 21 | 22 | - (UIViewController *)secondLastController; 23 | + (PostsNavigation *)postsNavigationWithRootControllerOrNil:(UIViewController *)rootControllerOrNil; 24 | - (void)replaceNavigationItemWithCustomBackButton:(UINavigationItem *)item; 25 | - (void)customBackTapped; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Common/Navigation/PromptManager.h: -------------------------------------------------------------------------------- 1 | @interface PromptManager : NSObject 2 | 3 | + (void)addPrompt:(NSString *)prompt; 4 | + (void)showConnectionErrorHud; 5 | + (void)showMomentaryHudWithMessage:(NSString *)message; 6 | + (void)showMomentaryHudWithMessage:(NSString *)message minShowTime:(CGFloat)minShowTime; 7 | + (void)showHudWithMessage:(NSString *)message; 8 | + (void)hideHud; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Navigation/StatefulControllerProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatefulControllerProtocol.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol StatefulControllerProtocol 12 | - (NSDictionary *)state; 13 | - (id)initWithState:(NSDictionary *)state; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Common/Navigation/TiltManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface TiltManager : NSObject 4 | 5 | - (void)activateTiltCalibrationMode; 6 | - (void)startMonitoringAccelerometer; 7 | 8 | + (TiltManager *)shared; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Note/JMTextView.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface JMTextView : UITextView 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Common/Note/TextViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextViewCell.h 3 | // PTLog 4 | // 5 | // Created by Ellen Miner on 2/20/09. 6 | // Copyright 2009 RaddOnline. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // cell identifier for this custom cell 12 | extern NSString *kCellTextView_ID; 13 | 14 | @interface TextViewCell : UITableViewCell { 15 | IBOutlet UITextView *textView; 16 | } 17 | + (TextViewCell*) createNewTextCellFromNib; 18 | 19 | @property (nonatomic, strong) UITextView *textView; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Common/Skin/ABBundleManager.h: -------------------------------------------------------------------------------- 1 | #import "ABBundleManagerKeys.h" 2 | #import 3 | #import 4 | 5 | @interface ABBundleManager : NSObject 6 | { 7 | NSBundle *bundle_; 8 | NSString *resourcePath_; 9 | NSDictionary *fontDictionary_; 10 | 11 | NSMutableDictionary *fontCache_; 12 | NSMutableDictionary *fontRefCache_; 13 | 14 | CTFontRef bodyFont_; 15 | } 16 | 17 | + (ABBundleManager*) sharedManager; 18 | 19 | - (NSString*)pathForResource:(NSString*)name; 20 | - (UIImage*)imageNamed:(NSString*)name; 21 | 22 | - (CTFontRef)fontRefForKey:(NSString*)key; 23 | - (UIFont *)fontForKey:(NSString*)key; 24 | - (void) resetFontCaches; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Common/Skin/SubredditManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SubredditManager.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 14/11/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SubredditManager : NSObject { 12 | NSBundle *bundle_; 13 | NSString *subreddit_; 14 | NSDictionary *tagDictionary_; 15 | } 16 | 17 | @property (nonatomic, strong) NSString * subreddit; 18 | 19 | + (SubredditManager*) sharedSubredditManager; 20 | - (UIImage*)imageNamed:(NSString*)name; 21 | - (UIImage *)imageForTag:(NSString *)tag; 22 | 23 | 24 | - (UIImage*)imageForTag:(NSString*)tag inSubreddit:(NSString *)subreddit; 25 | - (NSArray *)imageTagsAvailableForSubreddit:(NSString *)subreddit; 26 | 27 | - (BOOL)doesSubredditHaveAssets:(NSString *)subreddit; 28 | - (NSString *)randomSubreddit; 29 | - (NSArray *)defaultSubreddits; 30 | @end 31 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/FolderChangeTrackRecord+Sync.h: -------------------------------------------------------------------------------- 1 | // 2 | // FolderChangeTrackRecord+Sync.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "FolderChangeTrackRecord.h" 10 | 11 | typedef enum { 12 | ModifyingPartyLocal = 0, 13 | ModifyingPartyRemote, 14 | } ModifyingParty; 15 | 16 | @interface FolderChangeTrackRecord (Sync) 17 | @property NSUInteger modifiedBy; 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/FolderChangeTrackRecord+Sync.m: -------------------------------------------------------------------------------- 1 | // 2 | // FolderChangeTrackRecord+Sync.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "FolderChangeTrackRecord+Sync.h" 10 | 11 | @implementation FolderChangeTrackRecord (Sync) 12 | SYNTHESIZE_ASSOCIATED_INTEGER(modifiedBy, ModifiedBy); 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/GroupSyncHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // GroupSyncHandler.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SyncHandler.h" 10 | 11 | @interface GroupSyncHandler : SyncHandler 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/SyncManager+AlienBlue.h: -------------------------------------------------------------------------------- 1 | // 2 | // SyncManager+AlienBlue.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SyncManager.h" 10 | #import "VisitedLinksSyncHandler.h" 11 | 12 | @interface SyncManager (AlienBlue) 13 | 14 | @property (strong) VisitedLinksSyncHandler *visitedSyncHandler; 15 | 16 | - (void)addAlienBlueSyncHandlers; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/SyncManager+AlienBlue.m: -------------------------------------------------------------------------------- 1 | // 2 | // SyncManager+AlienBlue.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SyncManager+AlienBlue.h" 10 | #import "VisitedLinksSyncHandler.h" 11 | #import "GroupSyncHandler.h" 12 | #import "TemplatesSyncHandler.h" 13 | 14 | @implementation SyncManager (AlienBlue) 15 | 16 | SYNTHESIZE_ASSOCIATED_STRONG(VisitedLinksSyncHandler, visitedSyncHandler, VisitedSyncHandler); 17 | 18 | - (void)addAlienBlueSyncHandlers; 19 | { 20 | self.visitedSyncHandler = [VisitedLinksSyncHandler new]; 21 | [self addSyncHandler:self.visitedSyncHandler]; 22 | 23 | [self addSyncHandler:[GroupSyncHandler new]]; 24 | [self addSyncHandler:[TemplatesSyncHandler new]]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/TemplatesSyncHandler.h: -------------------------------------------------------------------------------- 1 | #import "SyncHandler.h" 2 | 3 | @interface TemplatesSyncHandler : SyncHandler 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Common/SyncHandlers/VisitedLinksSyncHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // VisitedLinksSyncHandler.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SyncHandler.h" 10 | 11 | @interface VisitedLinksSyncHandler : SyncHandler 12 | 13 | @property BOOL allowSyncToCloud; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Common/Views/ABButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABButton.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 3/01/11. 6 | // Copyright 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ABButton : UIControl 13 | { 14 | NSString * __ab_weak imageName_; 15 | } 16 | 17 | @property (nonatomic,ab_weak) NSString * imageName; 18 | 19 | @property (strong) UIImage *imageHighlighted; 20 | @property (strong) UIImage *imageNormal; 21 | @property (strong) UIImage *imageSelected; 22 | 23 | - (id)initWithImageName:(NSString *) imageName; 24 | - (id)initWithIcon:(UIImage *)icon; 25 | 26 | + (ABButton *) buttonWithImageName:(NSString *)imageName target:(id)target action:(SEL)action; 27 | + (ABButton *) buttonWithImageName:(NSString *)imageName onTap:(ABAction)onTap; 28 | - (void)expandTouchAreaWithPadding:(CGFloat)padding; 29 | @end 30 | -------------------------------------------------------------------------------- /Source/Common/Views/ABHoverLoadingIndicatorView.h: -------------------------------------------------------------------------------- 1 | #import "JMAnimatedControl.h" 2 | 3 | #define kABHoverLoadingIndicatorViewProgressRatioForError -21399. 4 | 5 | @interface ABHoverLoadingIndicatorView : JMAnimatedControl 6 | - (void)updateWithProgressRatio:(CGFloat)progressRatio; 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Views/ABHoverPreviewView.h: -------------------------------------------------------------------------------- 1 | @interface ABHoverPreviewView : UIView 2 | + (BOOL)canShowPreviewForURL:(NSURL *)URL; 3 | + (void)showPreviewForURL:(NSURL *)URL fromRect:(CGRect)rect onSuccessfulPresentation:(JMAction)onSuccessfulPresentation; 4 | + (BOOL)isShowingPreview; 5 | + (BOOL)hasRecentlyDismissedPreview; 6 | + (void)cancelVisiblePreviewAnimated:(BOOL)animated; 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Views/ABHoverScrubberView.h: -------------------------------------------------------------------------------- 1 | @interface ABHoverScrubberView : UIView 2 | 3 | - (void)updateWithCurrentTouchCenterXOffset:(CGFloat)touchXOffset; 4 | - (void)setStartingTouchCenterXOffset:(CGFloat)startingTouchXOffset; 5 | 6 | - (void)updateIconForEndPoint:(UIImage *)iconForEndPoint; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Common/Views/ABHoverVolumeControlView.h: -------------------------------------------------------------------------------- 1 | @interface ABHoverVolumeControlView : UIView 2 | 3 | @end 4 | -------------------------------------------------------------------------------- /Source/Common/Views/ABHoverVolumeControlView.m: -------------------------------------------------------------------------------- 1 | #import "ABHoverVolumeControlView.h" 2 | 3 | @interface ABHoverVolumeControlView() 4 | @property (strong) UIImageView *volumeTouchIndicatorView; 5 | @end 6 | 7 | @implementation ABHoverVolumeControlView 8 | 9 | - (instancetype)initWithFrame:(CGRect)frame; 10 | { 11 | JM_SUPER_INIT(initWithFrame:frame); 12 | self.backgroundColor = [UIColor purpleColor]; 13 | return self; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Common/Views/ABMailComposer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABMailComposer.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 6/09/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ABMailComposer : MFMailComposeViewController { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Common/Views/ABMailComposer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ABMailComposer.m 3 | // AlienBlue 4 | // 5 | // Created by JM on 6/09/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABMailComposer.h" 10 | #import "Resources.h" 11 | 12 | @implementation ABMailComposer 13 | 14 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 15 | if ([Resources isIPAD]) 16 | return YES; 17 | else 18 | return interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Common/Views/ABOutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABOutlineViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineViewController.h" 10 | #import "JMOutlineViewController+CustomNavigationBar.h" 11 | #import "ABCustomOutlineNavigationBar.h" 12 | 13 | @interface ABOutlineViewController : JMOutlineViewController 14 | 15 | @property (readonly) ABCustomOutlineNavigationBar *navigationBar; 16 | @property (readonly) NSString *customScreenNameForAnalytics; 17 | 18 | - (void)respondToStyleChange; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Common/Views/ABTableCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ABTableCellDrawerView.h" 3 | 4 | #define kABTableCellContentViewTag 23408 5 | 6 | @interface ABTableCell : UITableViewCell 7 | 8 | - (void)addDrawer:(ABTableCellDrawerView *)drawerView; 9 | - (void)removeDrawer; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Common/Views/ABTableCell.m: -------------------------------------------------------------------------------- 1 | #import "ABTableCell.h" 2 | #import "ABTableCellView.h" 3 | 4 | @interface ABTableCell() 5 | @end 6 | 7 | @implementation ABTableCell 8 | 9 | 10 | - (void)addDrawer:(ABTableCellDrawerView *)drawerView; 11 | { 12 | ABTableCellView *contentView = (ABTableCellView *)[self viewWithTag:kABTableCellContentViewTag]; 13 | [contentView addDrawerView:drawerView]; 14 | } 15 | 16 | - (void)removeDrawer; 17 | { 18 | ABTableCellView *contentView = (ABTableCellView *)[self viewWithTag:kABTableCellContentViewTag]; 19 | [contentView removeDrawerView]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Common/Views/ABTableCellDrawerView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ABButton.h" 3 | 4 | #define kABTableCellDrawerHeight 67. 5 | 6 | @interface ABTableCellDrawerView : UIControl 7 | 8 | @property (nonatomic,ab_weak) NSObject *delegate; 9 | @property (nonatomic,strong) NSObject *node; 10 | 11 | - (id)initWithNode:(NSObject *)node; 12 | 13 | - (UIButton *)createDrawerButtonWithIconName:(NSString *)iconName highlightColor:(UIColor *)highlightColor target:(id)target action:(SEL)action; 14 | - (void)addButton:(UIButton *)button; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Common/Views/ABTableCellView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "ABTableCellDrawerView.h" 4 | 5 | @interface ABTableCellView : UIView { 6 | CGPoint currentTouchPoint; 7 | CGPoint gestureStartPoint; 8 | CGRect attributedContentRect; 9 | CTFrameRef _frame; 10 | CGContextRef _context; 11 | // CGPoint _baselineOrigin; 12 | } 13 | 14 | - (NSString *) checkForLinkInAttributedString:(NSAttributedString *) attributedString atTouchPoint:(CGPoint)touchPoint; 15 | - (void) roundCornersForContext:(CGContextRef) c forRect:(CGRect) rect withRadius:(int) corner_radius; 16 | - (void) drawAttributedString:(NSAttributedString *) attributedString inBounds:(CGRect) rect; 17 | 18 | 19 | - (void)addDrawerView:(ABTableCellDrawerView *)drawerView; 20 | - (void)removeDrawerView; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Common/Views/ABWindow.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ABWindow : UIWindow 4 | 5 | @property (copy) BOOL(^customEventHandlerAction)(UIEvent *event); 6 | 7 | + (void)dimToAlpha:(CGFloat)alpha; 8 | + (void)removeDim; 9 | + (void)bringDimmingOverlayToFrontIfNecessary; 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Common/Views/JMAnimatedSlideIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMAnimatedSlideIndicatorView.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 20/01/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface JMAnimatedSlideIndicatorView : UIControl 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Common/Views/JMSurfaceButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // JMSurfaceButton.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIControl+Blocks.h" 11 | 12 | typedef enum { 13 | JMSurfaceLevelInset = 0, 14 | JMSurfaceLevelOffset = 1 15 | } JMSurfaceLevel; 16 | 17 | @interface JMSurfaceButton : UIControl 18 | 19 | - (id)initWithFrame:(CGRect)frame skinImageNamed:(NSString *)imageName imageColor:(UIColor *)color surfaceLevel:(JMSurfaceLevel)surfaceLevel; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Common/Views/JMTextField.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface JMTextField : UITextField 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Common/Views/ModerationSupportedTableDrawerView.h: -------------------------------------------------------------------------------- 1 | #import "ABTableCellDrawerView.h" 2 | 3 | @interface ModerationSupportedTableDrawerView : ABTableCellDrawerView 4 | - (UIButton *)generateModButton; 5 | - (BOOL)shouldShowModToolsByDefault; 6 | - (void)enterModModeAnimated:(BOOL)animated; 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Views/OptionCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // OptionCell.h 3 | // AlienBlue 4 | // 5 | // Created by DS on 20/06/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OptionCellView.h" 11 | 12 | @interface OptionCell : UITableViewCell 13 | @property (readonly, strong) OptionCellView *optionCellView; 14 | @property (readonly) BOOL isTicked; 15 | - (void)setOption:(NSMutableDictionary *)option; 16 | - (void)refreshBackground; 17 | @end -------------------------------------------------------------------------------- /Source/Common/Views/TransparentCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "TransparentCellContentView.h" 3 | 4 | @interface TransparentCell : UITableViewCell 5 | - (void)setShowNoise:(BOOL)noise; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Common/Views/TransparentCellContentView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface TransparentCellContentView : UIView 4 | 5 | @property (assign) BOOL showNoise; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Common/Views/TransparentCellContentView.m: -------------------------------------------------------------------------------- 1 | #import "TransparentCellContentView.h" 2 | 3 | @implementation TransparentCellContentView 4 | 5 | @synthesize showNoise = showNoise_; 6 | 7 | - (id)initWithFrame:(CGRect)frame 8 | { 9 | self = [super initWithFrame:frame]; 10 | if (self) { 11 | self.backgroundColor = [UIColor clearColor]; 12 | // Initialization code 13 | } 14 | return self; 15 | } 16 | 17 | - (void)drawRect:(CGRect)rect; 18 | { 19 | } 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Common/Views/TransparentToolbar.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransparentToolbar.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 30/08/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ABToolbar.h" 11 | 12 | 13 | @interface TransparentToolbar : ABToolbar { 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /Source/Common/Views/ViewContainerCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @interface ViewContainerNode : JMOutlineNode 4 | @property (strong) UIView *view; 5 | @property CGSize padding; 6 | @property CGFloat heightForViewPortrait; 7 | @property CGFloat heightForViewLandscape; 8 | @property BOOL resizesToFitCell; 9 | 10 | - (id)initWithView:(UIView *)view; 11 | @end 12 | 13 | @interface ViewContainerCell : JMOutlineCell 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+API.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+API.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 7 | #import "Sections/Comments/CommentPostHeaderNode.h" 8 | 9 | #define kCommentSortOrderTop @"top" 10 | 11 | @interface REDCommentsController (API) 12 | 13 | @property(strong) AFHTTPRequestOperation *loadOperation; 14 | @property(nonatomic, strong) NSString *sortOrder; 15 | @property NSUInteger customFetchLimit; 16 | @property BOOL disallowPrerendingAndAttributedStylePreprocessing; 17 | 18 | - (void)fetchCommentsOnComplete:(void (^)(NSArray *commentNodes, 19 | CommentPostHeaderNode *postHeaderNode))onComplete; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+Interaction.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+Interaction.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 5 | 6 | @class CommentPostHeaderNode; 7 | @class CommentNode; 8 | 9 | @interface REDCommentsController (Interaction) 10 | 11 | - (void)toggleSavePostNode:(CommentPostHeaderNode *)postHeaderNode; 12 | - (void)toggleHidePostNode:(CommentPostHeaderNode *)postHeaderNode; 13 | - (void)voteUpPostNode:(CommentPostHeaderNode *)postHeaderNode; 14 | - (void)voteDownPostNode:(CommentPostHeaderNode *)postHeaderNode; 15 | 16 | - (void)collapseToRootCommentNode:(CommentNode *)commentNode; 17 | 18 | - (void)deleteCommentNode:(CommentNode *)commentNode; 19 | - (void)focusContextCommentNode:(CommentNode *)commentNode; 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+LinkHandling.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+LinkHandling.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 5 | 6 | @interface REDCommentsController (LinkHandling) 7 | 8 | - (void)coreTextURLPressed:(NSString *)url; 9 | - (void)openLinkUrl:(NSString *)url; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+LinkHandling.m: -------------------------------------------------------------------------------- 1 | // REDCommentsController+LinkHandling.m 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController+LinkHandling.h" 5 | 6 | #import "Common/Additions/NSString+ABLegacyLinkTypes.h" 7 | #import "Common/Navigation/NavigationManager.h" 8 | #import "Common/Navigation/NavigationManager+Deprecated.h" 9 | #import "Helpers/MarkupEngine.h" 10 | #import "Helpers/Resources.h" 11 | #import "iPhone/BrowserViewController_iPhone.h" 12 | #import "Sections/Browser/BrowserViewController.h" 13 | #import "Sections/Posts/Post.h" 14 | 15 | @implementation REDCommentsController (LinkHandling) 16 | 17 | - (void)openLinkUrl:(NSString *)url; 18 | { [[NavigationManager shared] handleTapOnUrl:url fromController:self.detailViewController]; } 19 | 20 | - (void)coreTextURLPressed:(NSString *)url; 21 | { [self openLinkUrl:url]; } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+NavigationBar.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+NavigationBar.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 5 | 6 | @interface REDCommentsController (NavigationBar) 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+NavigationBar.m: -------------------------------------------------------------------------------- 1 | // REDCommentsController+NavigationBar.m 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController+NavigationBar.h" 5 | 6 | #import "Common/Navigation/NavigationManager.h" 7 | #import "Common/Views/TransparentToolbar.h" 8 | #import "Helpers/Resources.h" 9 | #import "Sections/Posts/Post.h" 10 | 11 | @implementation REDCommentsController (NavigationBar) 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+PopoverOptions.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+PopoverOptions.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 7 | 8 | @class Comment; 9 | @interface REDCommentsController (PopoverOptions) 10 | - (void)showOptionsForComment:(Comment *)comment; 11 | - (void)popupExtraOptionsActionSheet:(id)sender; 12 | 13 | - (void)showCommentSortOptions; 14 | - (void)showShareOptions; 15 | - (void)addNewComment; 16 | - (void)deletePost; 17 | - (void)loadAllImages; 18 | - (void)openThreadInSafari; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+ReplyInteraction.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+ReplyInteraction.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 5 | #import "Sections/Comments/CommentEntryViewController.h" 6 | 7 | @class CommentPostHeaderNode; 8 | @class CommentNode; 9 | @class BaseStyledTextNode; 10 | 11 | @interface REDCommentsController (ReplyInteraction) 12 | - (void)replyToPostNode:(CommentPostHeaderNode *)headerNode; 13 | - (void)replyToCommentNode:(CommentNode *)node; 14 | - (void)afterCommentReply:(NSDictionary *)newComment; 15 | - (BaseStyledTextNode *)nodeForElementId:(NSString *)elementId; 16 | - (void)showLegacyCommentEntryForDictionary:(NSDictionary *)rawDictionary editing:(BOOL)editing; 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Detail/Comments/REDCommentsController+State.h: -------------------------------------------------------------------------------- 1 | // REDCommentsController+State.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Detail/Comments/REDCommentsController.h" 5 | 6 | @interface REDCommentsController (State) 7 | - (void)handleRestoringStateAutoscroll; 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Detail/REDDetailHeaderCell.h: -------------------------------------------------------------------------------- 1 | // REDDetailHeaderCell.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "JMOutlineView/JMOutlineCell.h" 7 | #import "JMOutlineView/JMOutlineNode.h" 8 | 9 | @class Post; 10 | @class REDDetailViewController; 11 | 12 | @interface REDDetailHeaderCell : JMOutlineCell 13 | 14 | @end 15 | 16 | #pragma mark - view model 17 | 18 | @interface REDDetailHeaderNode : JMOutlineNode 19 | 20 | @property(nonatomic, strong) Post *post; 21 | @property(nonatomic, weak) REDDetailViewController *viewController; 22 | 23 | - (instancetype)initWithPost:(Post *)post 24 | viewController:(__weak REDDetailViewController *)viewController; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Detail/REDDetailSelfTextCell.h: -------------------------------------------------------------------------------- 1 | // REDDetailSelfTextCell.h 2 | // RedditApp 3 | 4 | #import "JMOutlineView/JMOutlineCell.h" 5 | #import "JMOutlineView/JMOutlineNode.h" 6 | 7 | @interface REDDetailSelfTextCell : JMOutlineCell 8 | 9 | @end 10 | 11 | #pragma mark - view model 12 | 13 | @interface REDDetailSelfTextNode : JMOutlineNode 14 | 15 | @property(nonatomic, strong) NSString *markdown; 16 | @property(nonatomic, weak) UIViewController *viewController; 17 | 18 | - (instancetype)initWithMarkdown:(NSString *)markdown 19 | viewController:(__weak UIViewController *)viewController; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Detail/REDDetailVideoCell.h: -------------------------------------------------------------------------------- 1 | // REDDetailVideoCell.h 2 | // RedditApp 3 | 4 | #import "JMOutlineView/JMOutlineCell.h" 5 | #import "JMOutlineView/JMOutlineNode.h" 6 | 7 | @interface REDDetailVideoCell : JMOutlineCell 8 | 9 | @end 10 | 11 | #pragma mark - view model 12 | 13 | @interface REDDetailVideoNode : JMOutlineNode 14 | 15 | @property(nonatomic, copy) NSString *URL; 16 | @property(nonatomic, strong) NSURL *thumbnailUrl; 17 | @property(nonatomic, assign) CGSize thumbnailSize; 18 | @property(nonatomic, weak) UIViewController *viewController; 19 | 20 | - (instancetype)initWithURL:(NSString *)URL 21 | thumbnailUrl:(NSURL *)thumbnailUrl 22 | thumbnailSize:(CGSize)thumbnailSize 23 | viewController:(__weak UIViewController *)viewController; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Helpers/ABAnalyticsManager.h: -------------------------------------------------------------------------------- 1 | #define kABAnalyticsCategoryApplication @"Application" 2 | #define kABAnalyticsCategoryAdvertorial @"Advertorial" 3 | 4 | @interface ABAnalyticsManager : NSObject 5 | 6 | + (void)trackEntryIntoScreen:(NSString *)screenName; 7 | + (void)trackEventWithCategory:(NSString *)category action:(NSString *)action; 8 | + (void)trackEventWithCategory:(NSString *)category action:(NSString *)action label:(NSString *)label; 9 | + (void)trackEventWithCategory:(NSString *)category action:(NSString *)action label:(NSString *)label value:(NSNumber *)value; 10 | + (void)pixelTrackResponse:(NSHTTPURLResponse *)response; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Helpers/ABCustomIdentifierManager.h: -------------------------------------------------------------------------------- 1 | @interface ABCustomIdentifierManager : NSObject 2 | 3 | + (ABCustomIdentifierManager *)sharedManager; 4 | 5 | @property (readonly) NSUUID *advertisingIdentifier; 6 | @property (readonly,getter=isAdvertisingTrackingEnabled) BOOL advertisingTrackingEnabled; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Helpers/ABNotificationManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ABNotificationManager : NSObject 4 | 5 | + (ABNotificationManager *)manager; 6 | 7 | - (void)applicationDidBecomeActive; 8 | - (void)applicationWillResignActive; 9 | - (void)applicationDidEnterBackground; 10 | 11 | - (void)handleRedditNotificationsOnComplete:(void(^)(BOOL hasNewData))onComplete; 12 | - (BOOL)handleLocalNotification:(UILocalNotification *)localNotification; 13 | 14 | - (void)askPermissionForLocalNotificationsIfNecessary; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Helpers/ABRemotelyManagedFeatures.h: -------------------------------------------------------------------------------- 1 | @interface ABRemotelyManagedFeatures : NSObject 2 | 3 | + (void)updateManagedFeaturesForAppLaunchOnComplete:(JMAction)onComplete; 4 | 5 | + (BOOL)isMoPubEnabled; 6 | + (BOOL)isAllowedToUseDeviceAdvertisingIdentifier; 7 | + (NSArray *)mopubSubredditWhitelist; 8 | + (BOOL)allowsMoPubForPRO; 9 | + (NSString *)mopubIdentifier; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Helpers/App.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface App : NSObject 5 | 6 | extern void DO_WHILE_TRAINING(NSString *prefKey, NSUInteger trainUpToNumber, dispatch_block_t block); 7 | extern void DONT_DO_WHILE_TRAINING(NSString *prefKey, NSUInteger trainUpToNumber, dispatch_block_t block); 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Helpers/AppSchemeCoordinator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // bookmarklet: 4 | // javascript:window.location='alienblue://post?url='+escape(window.location)+'&title='+escape(document.title) 5 | // Supported schemes: 6 | // alienblue://post?url=http://www.google.com.au 7 | // alienblue://subreddit?sr=iphone 8 | // alienblue://inbox 9 | 10 | @interface AppSchemeCoordinator : NSObject 11 | + (BOOL)handleSchemeWithURL:(NSURL *)openURL; 12 | + (void)handleApplicationDidBecomeActive; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Helpers/MarkupEngine.h: -------------------------------------------------------------------------------- 1 | // 2 | // MarkupEngine.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 13/11/10. 6 | // Copyright (c) 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define kABCoreTextImageID @"kABCoreTextImageID" 13 | #define kABCoreTextImage @"kABCoreTextImage" 14 | 15 | @interface MarkupEngine : NSObject 16 | 17 | + (void)refreshCoreTextStyles; 18 | + (NSMutableAttributedString *)markDownHTML:(NSString *)html forSubreddit:(NSString *)subreddit; 19 | + (CGFloat)heightOfAttributedString:(CFAttributedStringRef) as constrainedToWidth:(CGFloat) width; 20 | + (BOOL)doesSupportMarkdown; 21 | + (NSString *)flattenHTML:(NSString *)html; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Helpers/PhotoProcessing.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoProcessing.h 3 | // AlienBlue 4 | // 5 | // Created by Jason Morrissey on 16/06/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface PhotoProcessing : NSObject { 13 | 14 | } 15 | 16 | + (UIImage *)imageFromImage:(UIImage *)image inRect:(CGRect)rect; 17 | + (UIImage * )scaleAndRotateImage:(UIImage *)image ToMaxResolution:(int) kMaxResolution; 18 | + (UIImage *) processPhotoFromInfo:(NSDictionary *)info; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Account.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Account) 4 | 5 | @property (readonly, strong) NSString *authenticatedUser; 6 | @property (readonly) BOOL authenticated; 7 | @property NSUInteger base10Id; 8 | @property BOOL isMod; 9 | @property BOOL hasMail; 10 | @property BOOL hasModMail; 11 | @property BOOL isOver18; 12 | @property BOOL isGold; 13 | @property NSInteger karmaLink; 14 | @property NSInteger karmaComment; 15 | 16 | @property BOOL currentlyAuthenticating; 17 | 18 | - (void)prepareDefaultUserState; 19 | - (void)fetchUserInfo:(NSString *)username withCallback:(id)target; 20 | - (void)updateUserStateWithDictionary:(NSDictionary *)responseDictionary; 21 | - (void)resetConnectionsForUserDetails; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Announcements.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Announcements) 4 | - (void)prepareAnnouncementChecking; 5 | //- (void)checkRedditStatus; 6 | - (void)checkLatestAnnouncementsIfAllowedWithCallBackTarget:(id)target; 7 | - (void)clearAnnouncementCheckCallbacks; 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Captcha.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Captcha) 4 | - (void)requestCaptchaWithCallBackTarget:(id)target; 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Comments.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Comments) 4 | - (void)replyToItem:(NSMutableDictionary *)item callbackTarget:(id)callbackTarget; 5 | - (void)deleteCommentWithID:(NSString *)commentID; 6 | - (void)resetConnectionsForComments; 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+DeprecationPatches.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (DeprecationPatches) 4 | @end 5 | 6 | @interface JMJSONParser : NSObject 7 | @property NSUInteger maxDepth; 8 | - (id)objectWithString:(NSString*)repr; 9 | - (id)objectWithString:(NSString*)repr error:(NSError**)error; 10 | @end 11 | 12 | @interface NSObject (RedditAPI_DeprecationPatches) 13 | - (void)rd_performSelector:(SEL)aSelector withObject:(id)object; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+DeprecationPatches.m: -------------------------------------------------------------------------------- 1 | #import "RedditAPI+DeprecationPatches.h" 2 | #import "JSONKit.h" 3 | 4 | @implementation RedditAPI (DeprecationPatches) 5 | @end 6 | 7 | @implementation JMJSONParser 8 | 9 | - (id)objectWithString:(NSString*)repr; 10 | { 11 | return [repr mutableObjectFromJSONString]; 12 | } 13 | 14 | - (id)objectWithString:(NSString*)repr error:(NSError**)error; 15 | { 16 | return [repr mutableObjectFromJSONString]; 17 | } 18 | 19 | @end 20 | 21 | @implementation NSObject (RedditAPI_DeprecationPatches) 22 | 23 | - (void)rd_performSelector:(SEL)aSelector withObject:(id)object; 24 | { 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 27 | if ([self respondsToSelector:aSelector]) 28 | { 29 | [self performSelector:aSelector withObject:object]; 30 | } 31 | #pragma clang diagnostic pop 32 | } 33 | 34 | @end -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+ElementInteraction.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (ElementInteraction) 4 | 5 | - (void)hidePostWithID:(NSString *)postID; 6 | - (void)savePostWithID:(NSString *)postID; 7 | - (void)reportPostWithID:(NSString *)postID; 8 | - (void)unsavePostWithID:(NSString *)postID; 9 | - (void)unhidePostWithID:(NSString *)postID; 10 | - (void)submitVote:(NSMutableDictionary *)item; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+HideQueue.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (HideQueue) 4 | 5 | @property (strong, readonly) NSMutableArray *hideQueue; 6 | 7 | - (void)prepareHideQueue; 8 | - (BOOL)isPostInHideQueue:(NSString *)postID; 9 | - (void)addPostToHideQueue:(NSString *)postID; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Imgur.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Imgur) 4 | 5 | - (void)postImageToImgur:(NSData *)photoData callBackTarget:(id)target; 6 | - (void)removeImageFromImgurWithDeleteHash:(NSString *)deleteHash; 7 | - (void)resetConnectionsForImgur; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Messages.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Messages) 4 | 5 | - (void)fetchMessagesWithCategoryUrl:(NSString *)categoryUrl afterMessageID:(NSString *)messageID withCallBackTarget:(id)target; 6 | - (void)submitDirectMessage:(NSMutableDictionary *)messageToSubmit withCallBackTarget:(id)target; 7 | 8 | - (void)markMessageReadWithID: (NSString *) messageID; 9 | - (void)markAllMessagesAsRead; 10 | - (void)markAllModMailAsRead; 11 | 12 | - (void)resetConnectionsForMessages; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Moderation.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Moderation) 4 | 5 | - (void)modApproveItemWithName:(NSString *)name; 6 | - (void)modRemoveItemWithName:(NSString *)name; 7 | - (void)modMarkAsSpamItemWithName:(NSString *)name; 8 | - (void)modDistinguishItemWithName:(NSString *)name distinguish:(BOOL)distinguish; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+OAuth.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (OAuth) 4 | 5 | - (void)setActiveUsername:(NSString *)username; 6 | 7 | - (void)authenticateAndPersistTokensWithUsername:(NSString *)username password:(NSString *)password onComplete:(JMAction)onComplete onFailure:(JMOnErrorAction)onError; 8 | - (void)establishAuthenticationForCurrentUserOnComplete:(JMAction)onComplete onFailure:(void(^)(NSString *errorMessage, BOOL isSupercededByNewerAttempt))onFailure; 9 | 10 | - (void)deauthenticateUsername:(NSString *)username; 11 | - (void)cancelTokenRefreshTimers; 12 | 13 | - (BOOL)hasAuthenticatableUser; 14 | 15 | - (NSString *)recommendedServerForActiveUser; 16 | - (NSDictionary *)generateOAuthAuthenticationHeadersForRedditRequest; 17 | 18 | - (void)deleteLegacyKeychainItemForUsername:(NSString *)username; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Posting.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Posting) 4 | 5 | - (void)submitPost:(NSMutableDictionary *)newPostToSubmit withCallBackTarget:(id)target useJSON:(BOOL)useJSON; 6 | - (NSMutableArray *)getErrorsInPostSubmission:(NSString*)response; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Posts.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Posts) 4 | 5 | @property BOOL loadingPosts; 6 | 7 | // Bulk of API functionality has been migrated to Post+API 8 | - (void)resetConnectionsForPosts; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Posts.m: -------------------------------------------------------------------------------- 1 | #import "RedditAPI+Posts.h" 2 | 3 | @implementation RedditAPI (Posts) 4 | 5 | SYNTHESIZE_ASSOCIATED_BOOL(loadingPosts, LoadingPosts); 6 | 7 | - (void)resetConnectionsForPosts 8 | { 9 | self.loadingPosts = NO; 10 | [self clearConnectionsWithCategory:kConnectionCategoryPosts]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Helpers/RedditAPI+Subreddits.h: -------------------------------------------------------------------------------- 1 | #import "RedditAPI.h" 2 | 3 | @interface RedditAPI (Subreddits) 4 | 5 | - (void)resetConnectionsForSubreddits; 6 | - (void)subredditInfoForSubredditName:(NSString *)subredditName callBackTarget:(id)target; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Helpers/SessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SessionManager.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UserSubredditPreferences.h" 11 | #import "TemplatePrefs.h" 12 | 13 | @interface SessionManager : NSObject 14 | @property (strong, readonly) UserSubredditPreferences *subredditPrefs; 15 | @property (strong, readonly) TemplatePrefs *sharedTemplatePrefs; 16 | @property (strong) NSDate *sessionStart; 17 | - (void)switchUserSubredditPreferencesToAuthenticatedUser; 18 | - (void)resetGroups; 19 | 20 | + (SessionManager *)manager; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Helpers/ThumbManager+HitProtection.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThumbManager+HitProtection.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 28/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ThumbManager.h" 10 | 11 | @interface ThumbManager (HitProtection) 12 | @property (strong) NSCache *requestCache; // tracks only the request urls already in progress 13 | - (void)initialiseHitProtection; 14 | 15 | - (void)hitProtectionRequestBeganForKey:(NSString *)key; 16 | - (void)hitProtectionRequestCompletedForKey:(NSString *)key; 17 | - (void)hitProtectionRequestFailedForKey:(NSString *)key; 18 | 19 | - (BOOL)hitProtectionAllowRequestForKey:(NSString *)key; 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+API.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+API.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/Listing/REDListingViewController.h" 7 | 8 | @interface REDListingViewController (API) 9 | @property(strong) AFHTTPRequestOperation *loadPostOperation; 10 | - (NSDictionary *)postRequestOptionsRemoveExisting:(BOOL)removeExisting; 11 | - (void)fetchPostsRemoveExisting:(BOOL)removeExisting 12 | onComplete:(void (^)(NSArray *posts))onComplete; 13 | - (NSDictionary *)additionalURLParamsFromHeaderCoordinator; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+CanvasSupport.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+CanvasSupport.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | 6 | @interface REDListingViewController (CanvasSupport) 7 | @property BOOL shouldLaunchCanvasWithViewHidden; 8 | @property(readonly) BOOL isCanvasShowing; 9 | 10 | - (void)removeCanvas; 11 | - (void)notifyCanvasViewDidRotate:(UIInterfaceOrientation)fromInterfaceOrientation; 12 | - (void)notifyCanvasViewWillAppearAnimated:(BOOL)animated; 13 | - (void)notifyCanvasViewWillDisappearAnimated:(BOOL)animated; 14 | - (void)notifyCanvasViewDidUnload; 15 | - (void)showCanvas; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+Filters.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+Filters.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | #import "Sections/Posts/Post.h" 6 | 7 | @interface REDListingViewController (Filters) 8 | 9 | - (BOOL)shouldFilterPost:(Post *)post removeExisting:(BOOL)removeExisting; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+FooterSupport.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+FooterSupport.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | #import "Sections/Posts/NPostCell.h" 6 | 7 | @interface REDListingViewController (FooterSupport) 8 | 9 | - (void)loadMore; 10 | - (void)hideRead; 11 | - (void)hideAll; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+PopoverOptions.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+PopoverOptions.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | 6 | @interface REDListingViewController (PopoverOptions) 7 | 8 | @property(readonly) BOOL isSubscribedToSubreddit; 9 | @property(readonly) BOOL isNativeSubreddit; 10 | 11 | - (void)popupSubredditOptions; 12 | - (void)showAddSubredditToGroup; 13 | - (void)showSidebar; 14 | - (void)showMessageModsScreen; 15 | - (void)showGallery; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+PostInteraction.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+PostInteraction.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | #import "Sections/Posts/NPostCell.h" 6 | 7 | @interface REDListingViewController (PostInteraction) 8 | - (void)toggleSavePostNode:(PostNode *)postNode; 9 | - (void)toggleHidePostNode:(PostNode *)postNode; 10 | - (void)voteUpPostNode:(PostNode *)postNode; 11 | - (void)voteDownPostNode:(PostNode *)postNode; 12 | - (void)reportPostNode:(PostNode *)postNode; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+Sponsored.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+Sponsored.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | 6 | @interface REDListingViewController (Sponsored) 7 | 8 | - (void)initializeForSponsoredPostsIfNecessary; 9 | - (void)sponsored_viewDidLoad; 10 | - (void)sponsored_respondToStyleChange; 11 | - (void)sponsored_removeSponsoredAdsIfNecessary; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Listing/REDListingViewController+State.h: -------------------------------------------------------------------------------- 1 | // REDListingViewController+State.h 2 | // RedditApp 3 | 4 | #import "RedditApp/Listing/REDListingViewController.h" 5 | 6 | @interface REDListingViewController (State) 7 | - (void)handleRestoringStateAutoscroll; 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Posts/REDPostCommentsBar.h: -------------------------------------------------------------------------------- 1 | // REDPostCommentsBar.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "JMOutlineView/JMOutlineCell.h" 7 | #import "JMOutlineView/JMOutlineNode.h" 8 | 9 | @class Post; 10 | 11 | @interface REDPostCommentsBar : UIView 12 | 13 | + (CGFloat)height; 14 | 15 | - (instancetype)initWithPost:(Post *)post NS_DESIGNATED_INITIALIZER; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/REDDiscoverViewController.h: -------------------------------------------------------------------------------- 1 | // REDDiscoverViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/REDTabbedViewController.h" 7 | 8 | #import "Common/Navigation/ABNavigationController.h" 9 | 10 | @interface REDDiscoverViewController : REDTabbedViewController 11 | 12 | @property(nonatomic, readonly) ABNavigationController *abNavigationController; 13 | 14 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/REDHomeViewController.h: -------------------------------------------------------------------------------- 1 | // REDHomeViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/REDTabbedViewController.h" 7 | 8 | @interface REDHomeViewController : REDTabbedViewController 9 | 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/REDInboxViewController.h: -------------------------------------------------------------------------------- 1 | // REDInboxViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/REDTabbedViewController.h" 7 | 8 | @interface REDInboxViewController : REDTabbedViewController 9 | 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/REDNavigationBar.h: -------------------------------------------------------------------------------- 1 | // REDNavigationBar.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "iPhone/ABCustomOutlineNavigationBar.h" 7 | 8 | @interface REDNavigationBar : ABCustomOutlineNavigationBar 9 | 10 | @property(nonatomic, strong) UIView *titleView; 11 | 12 | - (void)addLeftButton:(UIButton *)button; 13 | - (void)addRightButton:(UIButton *)button; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/REDPopoutImageView.h: -------------------------------------------------------------------------------- 1 | // REDPopoutImageView.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDPopoutImageView : UIImageView 7 | 8 | @property(nonatomic, weak) UIViewController *viewController; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/REDPostViewController.h: -------------------------------------------------------------------------------- 1 | // REDPostViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/REDTabbedViewController.h" 7 | 8 | @interface REDPostViewController : REDTabbedViewController 9 | 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/REDRedditAppDelegate.h: -------------------------------------------------------------------------------- 1 | // REDRedditAppDelegate.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "Common/AppDelegate/AlienBlueAppDelegate.h" 7 | 8 | @interface REDRedditAppDelegate : AlienBlueAppDelegate 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/REDRedditMainTabBarController.h: -------------------------------------------------------------------------------- 1 | // REDRedditMainTabBarController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDRedditMainTabBarController : UITabBarController 7 | 8 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/REDTabbedViewController.h: -------------------------------------------------------------------------------- 1 | // REDTabbedViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDTabbedViewController : UIViewController 7 | 8 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 9 | 10 | - (void)setTabBarIconWithImageName:(NSString *)imageName 11 | selectedImageName:(NSString *)selectedImageName; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/REDUserViewController.h: -------------------------------------------------------------------------------- 1 | // REDUserViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | #import "RedditApp/REDTabbedViewController.h" 7 | 8 | @interface REDUserViewController : REDTabbedViewController 9 | 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/REDWebViewController.h: -------------------------------------------------------------------------------- 1 | // REDWebViewController.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDWebViewController : UIViewController 7 | 8 | - (instancetype)init NS_UNAVAILABLE; 9 | - (instancetype)initWithURL:(NSURL *)URL title:(NSString *)title; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Browser/ABOptimalBrowserConfiguration.h: -------------------------------------------------------------------------------- 1 | #import "JMOptimalBrowserConfiguration.h" 2 | 3 | @interface ABOptimalBrowserConfiguration : JMOptimalBrowserConfiguration 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Browser/BrowserViewController+Legacy.h: -------------------------------------------------------------------------------- 1 | #import "BrowserViewController.h" 2 | 3 | @interface BrowserViewController (Legacy) 4 | 5 | - (void)showLegacyExtraOptionsActionSheet:(id)sender; 6 | - (void)dismissLegacyExtraOptionsActionSheet; 7 | 8 | - (BOOL)isImageLink:(NSString *)link; 9 | - (void)saveImageToPhotoLibrary; 10 | - (void)showShareOptions; 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Browser/BrowserViewController+State.h: -------------------------------------------------------------------------------- 1 | // 2 | // BrowserViewController+State.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "BrowserViewController.h" 10 | 11 | @interface BrowserViewController (State) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Browser/BrowserViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NavigationManager.h" 3 | #import "MBProgressHUD.h" 4 | #import "Post.h" 5 | #import "JMOptimalBrowserController.h" 6 | #import "SlidingDragReleaseProtocol.h" 7 | 8 | @interface BrowserViewController : JMOptimalBrowserController 9 | 10 | @property (readonly) NSString *currentURL; 11 | @property (strong, readonly) Post *post; 12 | 13 | @property (readonly) BOOL shouldHideVoteIcons; 14 | 15 | - (id)initWithPost:(Post *)post; 16 | - (id)initWithUrl:(NSString *)url; 17 | 18 | - (void)popupExtraOptionsActionSheet:(id)sender; 19 | - (void)updateWithStaticHTML:(NSString *)html; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Sections/Browser/LinkShareActivityImageItemProvider.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface LinkShareActivityImageItemProvider : UIActivityItemProvider 4 | 5 | - (instancetype)initWithURL:(NSURL *)URL; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Browser/LinkShareActivityTitleItemProvider.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface LinkShareActivityTitleItemProvider : UIActivityItemProvider 4 | 5 | - (instancetype)initWithTitle:(NSString *)title; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Browser/LinkShareActivityTitleItemProvider.m: -------------------------------------------------------------------------------- 1 | #import "LinkShareActivityTitleItemProvider.h" 2 | #import "JMCoreMacros.h" 3 | 4 | @interface LinkShareActivityTitleItemProvider() 5 | @property (copy) NSString *title; 6 | @end 7 | 8 | @implementation LinkShareActivityTitleItemProvider 9 | 10 | - (instancetype)initWithTitle:(NSString *)title; 11 | { 12 | JM_SUPER_INIT(initWithPlaceholderItem:title); 13 | self.title = title; 14 | return self; 15 | } 16 | 17 | - (id)item; 18 | { 19 | // Assuming users will want only a URL when copying to clipboard 20 | // and not a prepended title 21 | if (self.activityType == UIActivityTypeCopyToPasteboard) 22 | return nil; 23 | 24 | return self.title; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Sections/Browser/LinkShareCoordinator.h: -------------------------------------------------------------------------------- 1 | @interface LinkShareCoordinator : NSObject 2 | 3 | + (void)presentLinkShareSheetFromViewController:(UIViewController *)presentFromController barButtonItemOrNil:(UIBarButtonItem *)barButtonItemOrNil withAddress:(NSString *)address title:(NSString *)title; 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Comments/BaseStyledTextNode+LinkThumbs.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentNode+LinkThumbs.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "BaseStyledTextNode.h" 10 | #import "CommentLink.h" 11 | 12 | @interface BaseStyledTextNode (LinkThumbs) 13 | @property (nonatomic, ab_weak) CommentLink *inlinePreviewLink; 14 | @property (strong) NSNumber *inlineImageAspectRatio; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Comments/BaseStyledTextNode+LinkThumbs.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommentNode+LinkThumbs.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "BaseStyledTextNode+LinkThumbs.h" 10 | 11 | @implementation BaseStyledTextNode (LinkThumbs) 12 | SYNTHESIZE_ASSOCIATED_STRONG(NSNumber, inlineImageAspectRatio, InlineImageAspectRatio); 13 | SYNTHESIZE_ASSOCIATED_WEAK(CommentLink, inlinePreviewLink, InlinePreviewLink); 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/Comments/BaseStyledTextNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseStyledTextNode.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineNode.h" 10 | 11 | @interface BaseStyledTextNode : JMOutlineNode 12 | 13 | @property (readonly) NSString *elementId; 14 | 15 | @property (readonly) NSArray *thumbLinks; 16 | 17 | @property (readonly) NSAttributedString *styledText; 18 | - (CGFloat)heightForBodyConstrainedToWidth:(CGFloat)width; 19 | - (BOOL)containsNSFWContent; 20 | - (BOOL)containsRestrictedContent; 21 | 22 | - (void)prefetchThumbnailsToCacheOnComplete:(ABAction)onComplete; 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommenEntryToolbar.h: -------------------------------------------------------------------------------- 1 | #import "JMTabView.h" 2 | 3 | @interface CommenEntryToolbar : JMTabView { 4 | 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommenEntryToolbar.m: -------------------------------------------------------------------------------- 1 | #import "CommenEntryToolbar.h" 2 | 3 | @implementation CommenEntryToolbar 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Comments/Comment+API.h: -------------------------------------------------------------------------------- 1 | // 2 | // Comment+API.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Comment.h" 10 | #import "AFNetworking.h" 11 | 12 | @class Post; 13 | 14 | @interface Comment (API) 15 | 16 | + (AFHTTPRequestOperation *)fetchCommentsForPost:(Post *)post contextId:(NSString *)contextId params:(NSDictionary *)params onComplete:(void (^)(NSArray *commentDictionaries, NSDictionary *postDictionary, BOOL clientError))onComplete; 17 | - (void)deleteComment; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Sections/Comments/Comment+Preprocess.h: -------------------------------------------------------------------------------- 1 | // 2 | // Comment+Preprocess.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Comment.h" 10 | 11 | @interface Comment (Preprocess) 12 | 13 | - (void)preprocessLinksAndAttributedStyle; 14 | - (void)preprocessLinksOnly; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Comments/Comment+Style.h: -------------------------------------------------------------------------------- 1 | // 2 | // Comment+Style.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Comment.h" 10 | 11 | @interface Comment (Style) 12 | @property (readonly) NSAttributedString *styledBody; 13 | - (CGFloat)heightForBodyConstrainedToWidth:(CGFloat)width; 14 | - (void)flushCachedStyles; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentAssetSelectorView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "iCarousel.h" 3 | 4 | @interface CommentAssetSelectorView : UIView 5 | - (id)initWithFrame:(CGRect)frame assetFolder:(NSString *)assetFolder; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentEntryTextView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CommentEntryTextView : UITextView 4 | { 5 | 6 | } 7 | 8 | -(void)insertTag:(NSString *)tag; 9 | -(void)insertLOD; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentEntryViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CommentEntryView.h" 3 | 4 | 5 | @protocol CommentEntryDelegate 6 | -(void) commentExited:(NSDictionary *)dictionary; 7 | -(void) commentEntered:(NSDictionary *)dictionary; 8 | @end 9 | 10 | @interface CommentEntryViewController : UIViewController 11 | 12 | -(void) showPopup; 13 | -(void) showAddImagePopup; 14 | 15 | + (CommentEntryViewController *) viewControllerForDelegate:(id)delegate withComment:(NSMutableDictionary *)comment editing:(BOOL)editing message:(BOOL)message; 16 | + (UINavigationController *) viewControllerWithNavigationForDelegate:(id)delegate withComment:(NSMutableDictionary *)comment editing:(BOOL)editing message:(BOOL)message; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentHeaderBarOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentHeaderBarOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | #import "CommentNode.h" 11 | 12 | #define kCommentHeaderBarOverlayHeight 29. 13 | 14 | @interface CommentHeaderBarOverlay : JMViewOverlay 15 | 16 | @property CGFloat horizontalPadding; 17 | 18 | - (void)updateForCommentNode:(CommentNode *)commentNode; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentLink.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentLink.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | LinkTypeArticle = 0, 13 | LinkTypePhoto, 14 | LinkTypeVideo, 15 | LinkTypeSelf 16 | } LinkType; 17 | 18 | @interface CommentLink : NSObject 19 | @property (nonatomic,strong) NSString *url; 20 | @property (nonatomic,strong) NSString *originalUrl; 21 | @property (nonatomic,strong) NSString *caption; 22 | @property (nonatomic) LinkType linkType; 23 | @property (nonatomic) BOOL isDescribed; 24 | 25 | + (LinkType)linkTypeFromLegacyType:(NSString *)legacyType; 26 | + (LinkType)linkTypeFromUrl:(NSString *)url; 27 | + (NSString *)friendlyNameFromLinkType:(LinkType)linkType; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentNode.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "BaseStyledTextNode.h" 10 | #import "Comment.h" 11 | #import "Post.h" 12 | 13 | @interface CommentNode : BaseStyledTextNode 14 | @property (strong) Comment *comment; 15 | @property (strong) Post *post; 16 | @property BOOL firstComment; 17 | @property BOOL isContext; 18 | - (id)initWithComment:(Comment *)comment level:(NSUInteger)level; 19 | + (CommentNode *)nodeForComment:(Comment *)comment level:(NSUInteger)level; 20 | - (void)prefetchThumbnails; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentOptionsDrawerView.h: -------------------------------------------------------------------------------- 1 | #import "ModerationSupportedTableDrawerView.h" 2 | 3 | @interface CommentOptionsDrawerView : ModerationSupportedTableDrawerView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentPostHeaderNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentPostHeaderNode.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "BaseStyledTextNode.h" 10 | #import "Post.h" 11 | #import "Comment.h" 12 | 13 | @interface CommentPostHeaderNode : BaseStyledTextNode 14 | @property (strong) Post *post; 15 | @property (strong) Comment *comment; 16 | 17 | @property (strong) NSNumber *inlineImageAspectRatio; 18 | @property BOOL isPlaceholderPost; 19 | @property BOOL forceImageLoad; 20 | 21 | + (CommentPostHeaderNode *)nodeForHeaderPost:(Post *)post; 22 | + (CommentPostHeaderNode *)placeholderNodeForPost:(Post *)post; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentPostHeaderThumbnailOverlay.h: -------------------------------------------------------------------------------- 1 | #import "ThumbOverlay.h" 2 | 3 | @interface CommentPostHeaderThumbnailOverlay : ThumbOverlay 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentPostHeaderToolbar.h: -------------------------------------------------------------------------------- 1 | #import "Post.h" 2 | #import "OverlayViewContainer.h" 3 | 4 | #define kCommentPostHeaderToolbarHeight ([Resources useActionMenu] ? 0. : 40.) 5 | 6 | @interface CommentPostHeaderToolbar : UIView 7 | 8 | @property (copy) void(^onModerationSendMessage)(id response); 9 | @property (copy) void(^onCanvasButtonTap)(void); 10 | @property BOOL shouldHighlightCanvasButton; 11 | + (CommentPostHeaderToolbar *)postHeaderToolbar; 12 | 13 | - (void)updateWithPost:(Post *)post; 14 | 15 | - (void)hideModTools; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentSeparatorBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentSeparatorBar.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | #define kCommentSeparatorBarHeight 16. 12 | 13 | @interface CommentSeparatorBar : JMViewOverlay 14 | 15 | - (void)setShouldDrawLineWithoutArrow:(BOOL)shouldDrawLineWithoutArrow; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+API.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+API.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "AFNetworking.h" 10 | #import "CommentsViewController.h" 11 | #import "CommentPostHeaderNode.h" 12 | 13 | #define kCommentSortOrderTop @"top" 14 | 15 | @interface CommentsViewController (API) 16 | 17 | @property (strong) AFHTTPRequestOperation *loadOperation; 18 | @property (nonatomic,strong) NSString *sortOrder; 19 | @property NSUInteger customFetchLimit; 20 | @property BOOL disallowPrerendingAndAttributedStylePreprocessing; 21 | 22 | - (void)fetchCommentsOnComplete:(void (^)(NSArray *commentNodes, CommentPostHeaderNode *postHeaderNode))onComplete; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+LinkHandling.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+LinkHandling.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController.h" 10 | 11 | @interface CommentsViewController (LinkHandling) 12 | 13 | - (void)coreTextURLPressed:(NSString *)url; 14 | - (void)openLinkUrl:(NSString *)url; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+LinkHandling.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+LinkHandling.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController+LinkHandling.h" 10 | #import "Post.h" 11 | #import "NavigationManager.h" 12 | #import "MarkupEngine.h" 13 | #import "BrowserViewController.h" 14 | #import "Resources.h" 15 | #import "BrowserViewController_iPhone.h" 16 | #import "NSString+ABLegacyLinkTypes.h" 17 | #import "NavigationManager+Deprecated.h" 18 | 19 | @implementation CommentsViewController (LinkHandling) 20 | 21 | - (void)openLinkUrl:(NSString *)url; 22 | { 23 | [[NavigationManager shared] handleTapOnUrl:url fromController:self]; 24 | } 25 | 26 | - (void)coreTextURLPressed:(NSString *)url; 27 | { 28 | [self openLinkUrl:url]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+NavigationBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+NavigationBar.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController.h" 10 | 11 | @interface CommentsViewController (NavigationBar) 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+NavigationBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+NavigationBar.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController+NavigationBar.h" 10 | #import "Post.h" 11 | #import "TransparentToolbar.h" 12 | #import "Resources.h" 13 | #import "NavigationManager.h" 14 | 15 | @implementation CommentsViewController (NavigationBar) 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+PopoverOptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+PopoverOptions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 25/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController.h" 10 | #import 11 | 12 | @class Comment; 13 | @interface CommentsViewController (PopoverOptions) 14 | - (void)showOptionsForComment:(Comment *)comment; 15 | - (void)popupExtraOptionsActionSheet:(id)sender; 16 | 17 | - (void)showCommentSortOptions; 18 | - (void)showShareOptions; 19 | - (void)addNewComment; 20 | - (void)deletePost; 21 | - (void)loadAllImages; 22 | - (void)openThreadInSafari; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+ReplyInteraction.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+ReplyInteraction.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 23/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController.h" 10 | #import "CommentEntryViewController.h" 11 | 12 | @class CommentPostHeaderNode; 13 | @class CommentNode; 14 | @class BaseStyledTextNode; 15 | 16 | @interface CommentsViewController (ReplyInteraction) 17 | - (void)replyToPostNode:(CommentPostHeaderNode *)headerNode; 18 | - (void)replyToCommentNode:(CommentNode *)node; 19 | - (void)afterCommentReply:(NSDictionary *)newComment; 20 | - (BaseStyledTextNode *)nodeForElementId:(NSString *)elementId; 21 | - (void)showLegacyCommentEntryForDictionary:(NSDictionary *)rawDictionary editing:(BOOL)editing; 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Comments/CommentsViewController+State.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController+State.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController.h" 10 | 11 | @interface CommentsViewController (State) 12 | - (void)handleRestoringStateAutoscroll; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Comments/FaviconOverlay.h: -------------------------------------------------------------------------------- 1 | #import "JMViewOverlay.h" 2 | 3 | @interface FaviconOverlay : JMViewOverlay 4 | 5 | - (void)updateWithUrl:(NSString *)url; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Comments/InlineImageOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // InlineImageOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 1/01/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | @class InlineImageNode; 12 | 13 | @interface InlineImageOverlay : JMViewOverlay 14 | - (void)updateForNode:(InlineImageNode *)node; 15 | + (CGFloat)heightForInlinePreviewForNode:(InlineImageNode *)node constrainedToWidth:(CGFloat)width; 16 | + (void)precacheImageForNode:(InlineImageNode *)node constrainedToWidth:(CGFloat)width; 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Comments/LinkThumbsOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // LinkThumbsOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | #import "BaseStyledTextNode.h" 11 | 12 | @class CommentLink; 13 | 14 | @interface LinkThumbsOverlay : JMViewOverlay 15 | @property CGRect commentTextRect; 16 | - (void)updateForNode:(BaseStyledTextNode *)commentNode; 17 | - (void)drawThumbnailForCommentLink:(CommentLink *)commentLink inFrame:(CGRect)thumbnailRect; 18 | + (CGFloat)heightForLinkThumbsOverlayForNode:(BaseStyledTextNode *)commentNode constrainedToWidth:(CGFloat)width textWidth:(CGFloat)textWidth; 19 | - (void)openCommentLink:(CommentLink *)commentLink forceBrowser:(BOOL)forceBrowser; 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Sections/Comments/NCenteredTextCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NCenteredTextCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | 11 | 12 | @interface CenteredTextNode : JMOutlineNode 13 | + (CenteredTextNode *)nodeWithTitle:(NSString *)title selectedTitle:(NSString *)selectedTitle; 14 | + (CenteredTextNode *)nodeWithTitle:(NSString *)title; 15 | @property (strong) NSString *title; 16 | @property (strong) NSString *selectedTitle; 17 | 18 | @property (strong) UIColor *customBackgroundColor; 19 | @property (strong) UIColor *customTitleColor; 20 | @property (strong) UIFont *customTitleFont; 21 | @property CGFloat customHeight; 22 | @end 23 | 24 | 25 | @interface NCenteredTextCell : JMOutlineCell 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Sections/Comments/NCommentCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NCommentCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | #import "NBaseStyledTextCell.h" 11 | #import "Comment.h" 12 | #import "ThreadLinesOverlay.h" 13 | #import "CommentSeparatorBar.h" 14 | #import "CommentHeaderBarOverlay.h" 15 | #import "VoteOverlay.h" 16 | 17 | @interface NCommentCell : NBaseStyledTextCell 18 | @property (readonly, strong) CommentHeaderBarOverlay *headerBar; 19 | @property (readonly, strong) ThreadLinesOverlay *threadLinesOverlay; 20 | @property (readonly, strong) CommentSeparatorBar *separatorBar; 21 | @property (readonly, strong) JMViewOverlay *dottedLineSeparatorOverlay; 22 | @property (readonly, strong) VoteOverlay *voteOverlay; 23 | @property (readonly) Comment *comment; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Sections/Comments/NInlineImageCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NInlineImageCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 1/01/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | #import "CommentLink.h" 11 | 12 | @interface InlineImageNode : JMOutlineNode 13 | @property (strong) CommentLink *commentLink; 14 | @property (strong) NSNumber *inlineImageAspectRatio; 15 | @end 16 | 17 | @interface NInlineImageCell : JMOutlineCell 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Comments/NoteEntryToolbar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NoteEntryToolbar.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 29/01/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ABToolbar.h" 11 | 12 | @interface NoteEntryToolbar : ABToolbar 13 | { 14 | id controlDelegate_; 15 | } 16 | 17 | @property (nonatomic,strong) id controlDelegate; 18 | 19 | - (void)addPhotoOptions; 20 | - (void)addTextMessage:(NSString *)text; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Comments/PhoneCommentEntryDrawer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @class PhoneCommentEntryDrawer; 5 | 6 | @protocol PhoneCommentEntryDrawerDelegate 7 | - (void)drawerWillExpand:(PhoneCommentEntryDrawer *)drawer; 8 | - (void)drawerWillCollapse:(PhoneCommentEntryDrawer *)drawer; 9 | @end 10 | 11 | @interface PhoneCommentEntryDrawer : UIView 12 | @property (nonatomic,strong) UIScrollView *scrollView; 13 | @property (ab_weak) NSObject * delegate; 14 | - (void)setCenterView:(UIView *)view; 15 | - (void)setLeftView:(UIView *)view; 16 | - (void)setRightView:(UIView *)view; 17 | - (void)toggleDrawerAnimated:(BOOL)animated; 18 | 19 | - (void)fadeGripsIn; 20 | - (void)fadeGripsOut; 21 | 22 | @end 23 | 24 | 25 | -------------------------------------------------------------------------------- /Source/Sections/Comments/PhoneCommentEntryDrawerSelectionView.h: -------------------------------------------------------------------------------- 1 | #import "JMSelectionView.h" 2 | 3 | @interface PhoneCommentEntryDrawerSelectionView : JMSelectionView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Comments/PhoneCommentEntryDrawerSelectionView.m: -------------------------------------------------------------------------------- 1 | #import "PhoneCommentEntryDrawerSelectionView.h" 2 | 3 | @implementation PhoneCommentEntryDrawerSelectionView 4 | 5 | - (id)initWithFrame:(CGRect)frame 6 | { 7 | self = [super initWithFrame:frame]; 8 | if (self) 9 | { 10 | self.layer.shadowOpacity = 0.; 11 | } 12 | return self; 13 | } 14 | 15 | - (void)layoutSubviews; 16 | { 17 | [self setNeedsDisplay]; 18 | } 19 | 20 | - (void)drawRect:(CGRect)rect 21 | { 22 | CGRect bounds = CGRectInset(self.bounds, 2., 2.); 23 | CGFloat radius = 0.5f * CGRectGetHeight(bounds); 24 | UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:bounds cornerRadius:radius]; 25 | [[UIColor colorWithWhite:1. alpha:0.2] set]; 26 | [path setLineWidth:1.]; 27 | [path stroke]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Source/Sections/Comments/PhoneCommentEntryView.h: -------------------------------------------------------------------------------- 1 | #import "ABButton.h" 2 | #import "CommentEntryView.h" 3 | #import "PhoneCommentEntryDrawer.h" 4 | 5 | @interface PhoneCommentEntryView : CommentEntryView 6 | 7 | @property (nonatomic,strong, readonly) PhoneCommentEntryDrawer *drawer; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Sections/Comments/PostImagePreviewOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostImagePreviewOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 20/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | #import "CommentPostHeaderNode.h" 12 | 13 | @interface PostImagePreviewOverlay : JMViewOverlay 14 | 15 | - (void)updateForNode:(CommentPostHeaderNode *)node; 16 | + (CGFloat)heightForInlinePreviewForNode:(CommentPostHeaderNode *)node constrainedToWidth:(CGFloat)width; 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Comments/StyledTextOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // StyledTextOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | typedef void (^LinkTappedAction)(NSString *link, CGPoint touchPoint); 12 | 13 | @class NCommentCell; 14 | 15 | @interface StyledTextOverlay : JMViewOverlay 16 | @property (nonatomic, copy) LinkTappedAction linkTapped; 17 | @property (nonatomic, copy) LinkTappedAction linkPressed; 18 | - (void)updateWithAttributedString:(NSAttributedString *)attributedString; 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Sections/Comments/ThreadLinesOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThreadLinesOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | @interface ThreadLinesOverlay : JMViewOverlay 12 | 13 | - (void)updateWithLevel:(NSUInteger)level; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/DiscoveryCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // Category.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Subreddit.h" 11 | 12 | @interface DiscoveryCategory : NSObject 13 | @property (strong) NSString *title; 14 | @property (strong) NSString *ident; 15 | @property (strong) NSString *iconIdent; 16 | 17 | @property (strong) NSArray *subCategories; 18 | @property (strong) NSArray *subreddits; 19 | 20 | - (id)initWithDiscoveryDictionary:(NSDictionary *)d; 21 | 22 | + (void)recommendSubreddit:(NSString *)subreddit forCategory:(DiscoveryCategory *)category onComplete:(ABAction)onComplete; 23 | @end 24 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/DiscoverySceneController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoverySceneController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | 11 | @interface DiscoverySceneController : ABOutlineViewController 12 | @property (strong) UIActivityIndicatorView *loadingIndicator; 13 | - (id)initWithTitle:(NSString *)title sceneIdent:(NSString *)ident; 14 | - (void)animateFolderChanges; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/NDiscoveryCategoryCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NDiscoveryGategoryCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NBaseOptionCell.h" 10 | #import "DiscoveryCategory.h" 11 | 12 | @interface DiscoveryCategoryNode : OptionNode 13 | @property (strong) DiscoveryCategory *category; 14 | + (DiscoveryCategoryNode *)categoryNodeForCategory:(DiscoveryCategory *)category; 15 | @end 16 | 17 | @interface NDiscoveryCategoryCell : NBaseOptionCell 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/NDiscoveryOptionCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NDiscoveryOptionCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NBaseOptionCell.h" 10 | 11 | typedef void(^OptionSwitchChange)(BOOL switchValue); 12 | 13 | @interface DiscoveryOptionNode : OptionNode 14 | @property (strong) NSString *subtitle; 15 | @property BOOL switchSetting; 16 | @property (copy) OptionSwitchChange onSwitchChange; 17 | @end 18 | 19 | @interface NDiscoveryOptionCell : NBaseOptionCell 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/NDiscoverySubredditCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NDiscoverySubredditCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NSubredditCell.h" 10 | 11 | @interface DiscoverySubredditNode : SubredditNode 12 | @property (copy) ABAction onThumbnailTap; 13 | @end 14 | 15 | @interface NDiscoverySubredditCell : NSubredditCell 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Discovery/Subreddit+Discovery.h: -------------------------------------------------------------------------------- 1 | // 2 | // Subreddit+Discovery.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Subreddit.h" 10 | 11 | @interface Subreddit (Discovery) 12 | @property CGFloat popularityRating; 13 | @property BOOL hasDiscoveryIcon; 14 | 15 | - (id)initWithDiscoveryDictionary:(NSDictionary *)d; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Messages/Message+API.h: -------------------------------------------------------------------------------- 1 | #import "Message.h" 2 | 3 | @interface Message (API) 4 | 5 | + (AFHTTPRequestOperation *)fetchMessagesForPath:(NSString *)path params:(NSDictionary *)params onComplete:(void (^)(NSArray *messages))onComplete; 6 | + (AFHTTPRequestOperation *)fetchLastSubmittedMessageCommentForUser:(NSString *)username onComplete:(void(^)(Message *messageCommentOrNil))onComplete; 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Messages/Message.h: -------------------------------------------------------------------------------- 1 | #import "Comment.h" 2 | 3 | @interface Message : Comment 4 | 5 | @property BOOL wasComment; 6 | @property NSUInteger firstMessageIdent; 7 | @property (copy) NSString *firstMessageName; 8 | @property (copy) NSString *destinationUser; 9 | @property (copy) NSString *subject; 10 | @property (copy) NSString *contextUrl; 11 | @property (copy) NSString *linkTitle; 12 | @property BOOL isUnread; 13 | 14 | @property (readonly) NSString *titleForPresentation; 15 | @property (readonly) NSString *metadataForPresentation; 16 | 17 | - (id)initWithDictionary:(NSDictionary *)dictionary; 18 | - (void)markAsRead; 19 | - (void)preprocessStyles; 20 | 21 | @property BOOL i_isModMail; 22 | @property (weak) Message *i_parentMessage; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageBoxSelectionBackgroundLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageBoxSelectionBackgroundLayer.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 31/12/12. 6 | // 7 | // 8 | 9 | #import "BarBackgroundLayer.h" 10 | 11 | @interface MessageBoxSelectionBackgroundLayer : CALayer 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageBoxSelectionView.h: -------------------------------------------------------------------------------- 1 | #import "JMSelectionView.h" 2 | 3 | @interface MessageBoxSelectionView : JMSelectionView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageBoxSelectionView.m: -------------------------------------------------------------------------------- 1 | #import "MessageBoxSelectionView.h" 2 | #import 3 | 4 | @implementation MessageBoxSelectionView 5 | 6 | - (id)initWithFrame:(CGRect)frame 7 | { 8 | self = [super initWithFrame:frame]; 9 | if (self) 10 | { 11 | self.layer.shadowOpacity = 0.; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)layoutSubviews; 17 | { 18 | [self setNeedsDisplay]; 19 | } 20 | 21 | - (void)drawRect:(CGRect)rect 22 | { 23 | CGRect selectionRect = CGRectInset(self.bounds, 11., 4.); 24 | selectionRect = CGRectOffset(selectionRect, 0., -1.); 25 | [[UIColor colorForTint] set]; 26 | [[UIBezierPath bezierPathWithRect:CGRectCropToBottom(selectionRect, 1.)] fill]; 27 | } 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageBoxTabItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageBoxTabItem.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 31/12/12. 6 | // 7 | // 8 | 9 | #import "JMTabItem.h" 10 | 11 | @interface MessageBoxTabItem : JMTabItem 12 | 13 | @property (strong) UIColor *forceHighlightColor; 14 | 15 | - (id)initWithTitle:(NSString *)title skinIconName:(NSString *)iconName; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageHeaderBarOverlay.h: -------------------------------------------------------------------------------- 1 | #import "JMViewOverlay.h" 2 | 3 | @class MessageNode; 4 | 5 | @interface MessageHeaderBarOverlay : JMViewOverlay 6 | 7 | - (void)updateForMessageNode:(MessageNode *)messageNode; 8 | 9 | + (CGFloat)recommendedHeaderBarHeightForMessageNode:(MessageNode *)messageNode; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessageOptionsDrawerView.h: -------------------------------------------------------------------------------- 1 | #import "ABTableCellDrawerView.h" 2 | 3 | @interface MessageOptionsDrawerView : ABTableCellDrawerView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessagesViewController+API.h: -------------------------------------------------------------------------------- 1 | #import "MessagesViewController.h" 2 | 3 | @interface MessagesViewController (API) 4 | @property (strong) AFHTTPRequestOperation *loadMessagesOperation; 5 | - (void)fetchMessagesRemoveExisting:(BOOL)removeExisting onComplete:(void (^)(NSArray *messages))onComplete; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessagesViewController+Interaction.h: -------------------------------------------------------------------------------- 1 | #import "MessagesViewController.h" 2 | 3 | @class MessageNode; 4 | 5 | @interface MessagesViewController (Interaction) 6 | 7 | - (void)voteUpMessageNode:(MessageNode *)messageNode; 8 | - (void)voteDownMessageNode:(MessageNode *)messageNode; 9 | - (void)showContextForMessageNode:(MessageNode *)messageNode; 10 | - (void)showReplyScreenForMessageNode:(MessageNode *)messageNode; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessagesViewController+LinkHandling.h: -------------------------------------------------------------------------------- 1 | #import "MessagesViewController.h" 2 | 3 | @interface MessagesViewController (LinkHandling) 4 | - (void)openLinkUrl:(NSString *)url; 5 | - (void)coreTextURLPressed:(NSString *)url; 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessagesViewController+LinkHandling.m: -------------------------------------------------------------------------------- 1 | #import "MessagesViewController+LinkHandling.h" 2 | #import "NSString+ABLegacyLinkTypes.h" 3 | #import "NavigationManager+Deprecated.h" 4 | #import "Resources.h" 5 | #import "BrowserViewController_iPhone.h" 6 | #import "MarkupEngine.h" 7 | 8 | @interface MessagesViewController (LinkHandling_) 9 | 10 | @end 11 | 12 | @implementation MessagesViewController (LinkHandling) 13 | 14 | - (void)openLinkUrl:(NSString *)url; 15 | { 16 | [[NavigationManager shared] dismissModalView]; 17 | [[NavigationManager shared] handleTapOnUrl:url fromController:self]; 18 | } 19 | 20 | - (void)coreTextURLPressed:(NSString *)url; 21 | { 22 | [self openLinkUrl:url]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Sections/Messages/MessagesViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | 3 | @interface MessagesViewController : ABOutlineViewController 4 | 5 | @property (readonly) BOOL shouldDecorateAsUserComments; 6 | @property BOOL shouldDismissModalAfterReplying; 7 | @property (copy, readonly) NSString *boxUrl; 8 | 9 | - (id)initWithBoxUrl:(NSString *)boxUrl; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Messages/NMessageCell.h: -------------------------------------------------------------------------------- 1 | #import "NCommentCell.h" 2 | #import "Message.h" 3 | 4 | @interface MessageNode : CommentNode 5 | @property (strong, readonly) Message *message; 6 | 7 | @property (copy) JMAction onHeaderBarTap; 8 | @property (copy) JMAction onContentsTap; 9 | 10 | - (id)initWithMessage:(Message *)message; 11 | 12 | @end 13 | 14 | @interface NMessageCell : NCommentCell 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Messages/NMessageSectionHeaderCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @class Message; 4 | 5 | @interface MessageSectionHeaderNode : JMOutlineNode 6 | 7 | @property (strong, readonly) Message *message; 8 | @property NSUInteger numberOfUnreadChildren; 9 | 10 | - (id)initWithTopLevelMessage:(Message *)message; 11 | 12 | @end 13 | 14 | @interface NMessageSectionHeaderCell : JMOutlineCell 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Messages/SendMessageViewController+Submit.h: -------------------------------------------------------------------------------- 1 | // 2 | // SendMessageViewController+Submit.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 27/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SendMessageViewController.h" 10 | #import "CaptchaEntryViewController.h" 11 | 12 | @interface SendMessageViewController (Submit) 13 | 14 | - (void)submit; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Messages/SendMessageViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SendMessageViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 25/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | #import "JMTextView.h" 11 | 12 | @interface SendMessageViewController : ABOutlineViewController 13 | 14 | @property (readonly,strong) JMTextView *messageTextView; 15 | @property (readonly,strong) NSString *username; 16 | @property (readonly,strong) NSString *subject; 17 | 18 | - (id)initWithUsername:(NSString *)username; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/ModerationNotifyViewController.h: -------------------------------------------------------------------------------- 1 | #import "TemplatesViewController.h" 2 | #import "Post.h" 3 | 4 | @interface ModerationNotifyViewController : TemplatesViewController 5 | 6 | - (id)initWithPost:(Post *)post; 7 | 8 | @property (copy) void(^onModerationNotifySendComplete)(id response); 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/NCenteredButtonCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NCenteredButtonCell.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 7/01/13. 6 | // 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | 11 | @interface CenteredButtonNode : JMOutlineNode; 12 | @end 13 | 14 | @interface NCenteredButtonCell : JMOutlineCell 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/NCenteredButtonCell.m: -------------------------------------------------------------------------------- 1 | #import "NCenteredButtonCell.h" 2 | 3 | @interface CenteredButtonNode() 4 | @property (strong) NSString *title; 5 | @property (strong) UIColor *buttonColor; 6 | @end 7 | 8 | @implementation CenteredButtonNode 9 | 10 | - (id)initWithTitle:(NSString *)title buttonColor:(UIColor *)buttonColor; 11 | { 12 | self = [super init]; 13 | if (self) 14 | { 15 | self.title = title; 16 | self.buttonColor = buttonColor; 17 | } 18 | return self; 19 | } 20 | 21 | + (Class)cellClass; 22 | { 23 | return UNIVERSAL(NCenteredButtonCell); 24 | } 25 | 26 | @end 27 | 28 | @implementation NCenteredButtonCell 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/Template.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef enum TemplateSendPreference { 4 | TemplateSendPreferencePersonalMessage = 0, 5 | TemplateSendPreferenceComment 6 | } TemplateSendPreference; 7 | 8 | @interface Template : NSObject 9 | 10 | @property (strong) NSString *body; 11 | @property (strong) NSString *title; 12 | @property TemplateSendPreference sendPreference; 13 | 14 | @property BOOL removed; 15 | @property BOOL stockTemplate; 16 | 17 | + (Template *)templateWithTitle:(NSString *)title body:(NSString *)body; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateCell.h: -------------------------------------------------------------------------------- 1 | #import "NBaseOptionCell.h" 2 | #import "Template.h" 3 | 4 | @interface TemplateNode : OptionNode 5 | - (id)initWithTemplate:(Template *)tPlate; 6 | @property (strong, readonly) Template *tPlate; 7 | @end 8 | 9 | @interface TemplateCell : NBaseOptionCell 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateDetailViewController.h: -------------------------------------------------------------------------------- 1 | #import "JMTextViewController.h" 2 | #import "Template.h" 3 | 4 | typedef enum TemplateDetailMode { 5 | TemplateDetailModeTemplateEdit, 6 | TemplateDetailModeExpanded, 7 | } TemplateDetailMode; 8 | 9 | @interface TemplateDetailViewController : JMTextViewController 10 | 11 | @property (copy) void(^onTemplateEditComplete)(NSString *templateTitle, NSString *body, TemplateSendPreference sendPreference); 12 | @property BOOL useSendAsDoneButtonTitle; 13 | @property BOOL hidesNavbarTextField; 14 | @property (strong) NSString *defaultTemplateTitle; 15 | 16 | - (id)initWithTemplate:(Template *)tPlate mode:(TemplateDetailMode)mode tokens:(NSArray *)tokens; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateEditToolsView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Template.h" 3 | #import "ABButton.h" 4 | #import "TemplateSendModeSwitchView.h" 5 | 6 | 7 | @interface TemplateEditToolsView : UIView 8 | 9 | @property (readonly, strong) ABButton *tokenButton; 10 | @property (readonly, strong) TemplateSendModeSwitchView *switchView; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateGroup+SampleTemplates.h: -------------------------------------------------------------------------------- 1 | #import "TemplateGroup.h" 2 | 3 | @interface TemplateGroup (SampleTemplates) 4 | 5 | - (void)addApprovalSampleTemplates; 6 | - (void)addRemovalSampleTemplates; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateGroup.h: -------------------------------------------------------------------------------- 1 | #import "Template.h" 2 | 3 | @interface TemplateGroup : NSObject 4 | 5 | @property (strong) NSString *title; 6 | @property (strong) NSString *ident; 7 | @property (strong) NSMutableArray *templates; 8 | 9 | + (TemplateGroup *)groupWithTitle:(NSString *)title; 10 | 11 | - (void)i_addTemplate:(Template *)tplate; 12 | - (void)i_removeTemplate:(Template *)tplate; 13 | - (void)i_insertTemplate:(Template *)tplate atIndex:(NSUInteger)nIndex; 14 | 15 | @property (readonly) NSArray *userCreatedTemplates; 16 | @property (readonly) NSArray *stockTemplates; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateSendModeSwitchView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Template.h" 3 | 4 | @interface TemplateSendModeSwitchView : UIControl 5 | 6 | @property (readonly, strong) UIImageView *trackView; 7 | @property (readonly, strong) UIImageView *leftIconView; 8 | @property (readonly, strong) UIImageView *rightIconView; 9 | 10 | @property (copy) void(^onSendSwitchChange)(TemplateSendPreference sendPref); 11 | - (void)setDefaultSendSwitchPreference:(TemplateSendPreference)sendPref; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Moderation/TemplateToken.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NSString*(^TokenReplacerBlock)(); 4 | 5 | @interface TemplateToken : NSObject 6 | 7 | @property (readonly) NSString *title; 8 | @property (readonly) NSString *tokenIdent; 9 | @property (readonly) NSString *escapedToken; 10 | @property (readonly) NSString *replacerString; 11 | 12 | - (id)initWithTokenIdent:(NSString *)tokenIdent title:(NSString *)title tokenReplacer:(TokenReplacerBlock)tokenReplacer; 13 | - (void)applyTokenToMutableString:(NSMutableString *)mString; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/AccountSelectorViewController.h: -------------------------------------------------------------------------------- 1 | #import "ItemSelectorViewController.h" 2 | 3 | @interface AccountSelectorViewController : ItemSelectorViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/CaptchaEntryViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ABOutlineViewController.h" 3 | 4 | @class CaptchaEntryViewController; 5 | 6 | @protocol CaptchaEntryDelegate 7 | - (void)didEnterCaptcha:(NSString *)captchaEntered forCaptchaId:(NSString *)captchaId; 8 | @end 9 | 10 | @interface CaptchaEntryViewController : ABOutlineViewController 11 | @property (nonatomic,ab_weak) id delegate; 12 | @property (nonatomic,strong) NSString *propertyKey; 13 | - (id)initWithDelegate:(id)delegate propertyKey:(NSString *)propertyKey; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/CreatePostDetailCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @interface CreatePostDetailCell : JMOutlineCell 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/CreatePostMoreOptionsCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @interface MoreOptionsNode : JMOutlineNode 4 | @end 5 | 6 | @interface CreatePostMoreOptionsCell : JMOutlineCell 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/CreatePostSubmitCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @interface PostSubmitNode : JMOutlineNode 4 | @property BOOL shouldShowSubmitRulesButton; 5 | @property BOOL shouldShowPostWarning; 6 | @end 7 | 8 | @interface CreatePostSubmitCell : JMOutlineCell 9 | @end 10 | 11 | 12 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/CreatePostViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | #import "ItemSelectorViewController.h" 3 | #import "JMTabView.h" 4 | #import "JMTextViewController.h" 5 | #import "PhotoUploadViewController.h" 6 | #import "CaptchaEntryViewController.h" 7 | #import "ABNavigationController.h" 8 | 9 | @interface CreatePostViewController : ABOutlineViewController 10 | 11 | + (ABNavigationController *) viewControllerWithNavigation; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | @interface ItemSelectorCell : JMOutlineCell 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorManualEntryCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | #import "JMTextFieldEntry.h" 3 | 4 | @interface ItemSelectorManualEntryCell : JMOutlineCell 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorManualEntryNode.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineNode.h" 2 | 3 | @interface ItemSelectorManualEntryNode : JMOutlineNode 4 | 5 | @property (nonatomic,strong) NSString * placeholder; 6 | @property (nonatomic,strong) NSString * enteredString; 7 | 8 | + (ItemSelectorManualEntryNode *)nodeWithPlaceholder:(NSString *)placeholder; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorManualEntryNode.m: -------------------------------------------------------------------------------- 1 | #import "ItemSelectorManualEntryNode.h" 2 | 3 | @implementation ItemSelectorManualEntryNode 4 | 5 | @synthesize placeholder = placeholder_; 6 | @synthesize enteredString = enteredString_; 7 | 8 | 9 | + (Class)cellClass; 10 | { 11 | return NSClassFromString(@"ItemSelectorManualEntryCell"); 12 | } 13 | 14 | //+ (SEL)selectedAction; 15 | //{ 16 | // return @selector(selectorManualEntryCellSelected:); 17 | //} 18 | 19 | + (ItemSelectorManualEntryNode *)nodeWithPlaceholder:(NSString *)placeholder; 20 | { 21 | ItemSelectorManualEntryNode *node = [[ItemSelectorManualEntryNode alloc] init]; 22 | node.placeholder = placeholder; 23 | return node; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorNode.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineNode.h" 2 | 3 | @interface ItemSelectorNode : JMOutlineNode 4 | 5 | @property (nonatomic,strong) NSString *uniqueId; 6 | @property (nonatomic,strong) NSString *title; 7 | @property (nonatomic,strong) NSString *thumbUrl; 8 | @property (nonatomic,strong) UIImage *placeholderIcon; 9 | @property (nonatomic,strong) UIImage *icon; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorNode.m: -------------------------------------------------------------------------------- 1 | #import "ItemSelectorNode.h" 2 | 3 | @implementation ItemSelectorNode 4 | 5 | @synthesize title = title_; 6 | @synthesize uniqueId = uniqueId_; 7 | @synthesize thumbUrl = thumbUrl_; 8 | @synthesize icon = icon_; 9 | @synthesize placeholderIcon = placeholderIcon_; 10 | 11 | 12 | + (Class)cellClass; 13 | { 14 | return NSClassFromString(@"ItemSelectorCell"); 15 | } 16 | 17 | //+ (SEL)selectedAction; 18 | //{ 19 | // return @selector(selectorCellSelected:); 20 | //} 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/ItemSelectorViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | 3 | @class ItemSelectorViewController; 4 | 5 | @protocol ItemSelectorDelegate 6 | - (void)itemSelectorDidSelectValue:(NSString *)value propertyKey:(NSString *)propertyKey; 7 | @end 8 | 9 | @interface ItemSelectorViewController : ABOutlineViewController 10 | 11 | @property (nonatomic,ab_weak) id delegate; 12 | @property (nonatomic,strong) NSString *propertyKey; 13 | - (id)initWithDelegate:(id) delegate; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/PhotoUploadViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ABOutlineViewController.h" 3 | 4 | @class PhotoUploadViewController; 5 | 6 | @protocol PhotoUploadDelegate 7 | - (void)didUploadToImgurImage:(UIImage *)image withUrl:(NSString *)url; 8 | @end 9 | 10 | @interface PhotoUploadViewController : ABOutlineViewController 11 | @property (nonatomic,ab_weak) id delegate; 12 | @property (nonatomic,strong) NSString *propertyKey; 13 | - (id)initWithDelegate:(id)delegate propertyKey:(NSString *)propertyKey; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/PostDetailNode.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineNode.h" 2 | 3 | @interface PostDetailNode : JMOutlineNode 4 | 5 | @property (nonatomic,strong) NSString *key; 6 | @property (nonatomic,strong) NSString *title; 7 | @property (nonatomic,strong) NSString *value; 8 | @property (nonatomic,strong) NSString *placeholder; 9 | @property (nonatomic,strong) UIImage *icon; 10 | @property (nonatomic,strong) UIImage *disclosureIcon; 11 | 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/PostDetailNode.m: -------------------------------------------------------------------------------- 1 | #import "PostDetailNode.h" 2 | 3 | @implementation PostDetailNode 4 | 5 | @synthesize key = key_; 6 | @synthesize title = title_; 7 | @synthesize value = value_; 8 | @synthesize placeholder = placeholder_; 9 | @synthesize icon = icon_; 10 | @synthesize disclosureIcon = disclosureIcon_; 11 | 12 | + (Class)cellClass; 13 | { 14 | return NSClassFromString(@"CreatePostDetailCell"); 15 | } 16 | 17 | //+ (SEL)selectedAction; 18 | //{ 19 | // return @selector(postNodeSelected:); 20 | //} 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/PostCreation/SubredditSelectorViewController.h: -------------------------------------------------------------------------------- 1 | #import "ItemSelectorViewController.h" 2 | 3 | @interface SubredditSelectorViewController : ItemSelectorViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/CanvasPreviewDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // CanvasPreviewDemo.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 30/01/11. 6 | // Copyright 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface CanvasPreviewDemo : UIViewController 13 | { 14 | IBOutlet UIImageView * imageView; 15 | IBOutlet UIButton * upgradeButton; 16 | IBOutlet UILabel * iOS4RecommendedLabel; 17 | } 18 | 19 | @property (nonatomic,strong) IBOutlet UIImageView * imageView; 20 | @property (nonatomic,strong) IBOutlet UIButton * upgradeButton; 21 | @property (nonatomic,strong) IBOutlet UILabel * iOS4RecommendedLabel; 22 | 23 | - (void) closePanel:(id) sender; 24 | - (void) upgradePressed:(id) sender; 25 | @end 26 | -------------------------------------------------------------------------------- /Source/Sections/Posts/GalleryViewController.h: -------------------------------------------------------------------------------- 1 | #import "SubredditGalleryViewController.h" 2 | 3 | @interface GalleryViewController : SubredditGalleryViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/LoadMoreSliderTrack.h: -------------------------------------------------------------------------------- 1 | #import "JMSliderTrack.h" 2 | 3 | @interface LoadMoreSliderTrack : JMSliderTrack 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/MPNativeAd+ABAdditionalImpressionTracking.h: -------------------------------------------------------------------------------- 1 | #import "MPNativeAd.h" 2 | 3 | @interface MPNativeAd (ABAdditionalImpressionTracking) 4 | 5 | - (void)ab_attachAdditionalImpressionTrackerWithAction:(void(^)(NSString *adIdentifier))impressionAction; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/Sections/Posts/MoPubCompatibleOutlineView.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineTableView.h" 2 | 3 | @interface MoPubCompatibleOutlineView : JMOutlineTableView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/ModButtonOverlay.h: -------------------------------------------------------------------------------- 1 | #import "JMViewOverlay.h" 2 | #import "VotableElement.h" 3 | 4 | @interface ModButtonOverlay : JMViewOverlay 5 | 6 | - (id)initAsIndicatorOnly; 7 | - (id)initAsButton; 8 | 9 | - (void)updateWithVotableElement:(VotableElement *)votableElement; 10 | 11 | + (UIColor *)indicatorColorForModState:(ModerationState)modState; 12 | + (void)drawModLightIndicatorWithColor:(UIColor *)indicatorColor inRect:(CGRect)indicatorRect; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/Posts/Post+Sponsored.h: -------------------------------------------------------------------------------- 1 | #import "Post.h" 2 | #import "MPNativeAd.h" 3 | 4 | #define kSponsoredAdCommentThreadFieldKey @"comment-thread-url" 5 | #define kSponsoredAdRedditIdentifierFieldKey @"reddit-ad-identifier" 6 | #define kSponsoredAdSubtitleFieldKey @"subtitle" 7 | #define kSponsoredAdAllowsOptimalViewFieldKey @"allows-optimal-view" 8 | 9 | @interface Post (Sponsored) 10 | 11 | @property (strong, readonly) MPNativeAd *nativeAd; 12 | 13 | @property (readonly) NSString *sponsoredPostThreadName; 14 | @property (readonly) BOOL sponsoredPostHasCommentThread; 15 | @property (readonly) BOOL sponsoredPostAllowsOptimalBrowser; 16 | @property (readonly) BOOL sponsoredPostRequiresConversionTracking; 17 | 18 | - (void)updateWithNativeAdData:(MPNativeAd *)nativeAd; 19 | - (void)trackSponsoredLinkVisitIfNecessary; 20 | - (void)trackSponsoredCommentsVisitIfNecessary; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Posts/Post+Style.h: -------------------------------------------------------------------------------- 1 | // 2 | // Post+Style.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Post.h" 10 | 11 | @interface Post (Style) 12 | - (NSAttributedString *)styledTitle; 13 | - (NSAttributedString *)styledTitleWithDetails; 14 | 15 | - (CGFloat)titleHeightConstrainedToWidth:(CGFloat)width; 16 | 17 | - (void)flushCachedStyles; 18 | - (void)preprocessStyles; 19 | 20 | - (void)drawTitleCenteredVerticallyInRect:(CGRect)rect context:(CGContextRef)context; 21 | - (void)drawSubdetailsInRect:(CGRect)rect context:(CGContextRef)context; 22 | - (void)drawCommentCountInRect:(CGRect)rect context:(CGContextRef)context; 23 | - (void)drawTimeAgoInRect:(CGRect)rect context:(CGContextRef)context; 24 | 25 | - (UIColor *)linkFlairBackgroundColorForPresentation; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostModerationControlView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Post.h" 3 | 4 | @interface PostModerationControlView : UIView 5 | 6 | @property (copy) ABAction onCancelTap; 7 | @property (copy) ABAction onModerationStateChange; 8 | @property (copy) void(^onModerationWillShowTemplateSelectionScreen)(void); 9 | @property (copy) void(^onModerationMessageSentResponse)(id response); 10 | 11 | - (void)updateWithPost:(Post *)post; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostOptionsDrawerView.h: -------------------------------------------------------------------------------- 1 | #import "ModerationSupportedTableDrawerView.h" 2 | 3 | @interface PostOptionsDrawerView : ModerationSupportedTableDrawerView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsNavigationTitleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsNavigationTitleView.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 2/06/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "OverlayViewContainer.h" 11 | #import "Subreddit.h" 12 | 13 | @interface PostsNavigationTitleView : OverlayViewContainer 14 | - (id)initWithFrame:(CGRect)frame forSubreddit:(Subreddit *)subreddit; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsShowMoreButton.h: -------------------------------------------------------------------------------- 1 | #import "JMCenterView.h" 2 | 3 | @interface PostsShowMoreButton : JMCenterView 4 | 5 | @property (assign) BOOL showGrips; 6 | @property (assign) BOOL forceDark; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsTableCoordinator.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsHeaderFooterCoordinator.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 10/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PostsHeaderCoordinator : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+API.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+API.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 12/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | #import "AFNetworking.h" 11 | 12 | @interface PostsViewController (API) 13 | @property (strong) AFHTTPRequestOperation *loadPostOperation; 14 | - (NSDictionary *)postRequestOptionsRemoveExisting:(BOOL)removeExisting; 15 | - (void)fetchPostsRemoveExisting:(BOOL)removeExisting onComplete:(void (^)(NSArray *posts))onComplete; 16 | - (NSDictionary *)additionalURLParamsFromHeaderCoordinator; 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+CanvasSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+CanvasSupport.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 12/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | 11 | @interface PostsViewController (CanvasSupport) 12 | @property BOOL shouldLaunchCanvasWithViewHidden; 13 | @property (readonly) BOOL isCanvasShowing; 14 | 15 | - (void)removeCanvas; 16 | - (void)notifyCanvasViewDidRotate:(UIInterfaceOrientation)fromInterfaceOrientation; 17 | - (void)notifyCanvasViewWillAppearAnimated:(BOOL)animated; 18 | - (void)notifyCanvasViewWillDisappearAnimated:(BOOL)animated; 19 | - (void)notifyCanvasViewDidUnload; 20 | - (void)showCanvas; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+Filters.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+Filters.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 12/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | #import "Post.h" 11 | 12 | @interface PostsViewController (Filters) 13 | 14 | - (BOOL)shouldFilterPost:(Post *)post removeExisting:(BOOL)removeExisting; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+FooterSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+Hiding.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 10/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | #import "NPostCell.h" 11 | 12 | @interface PostsViewController (FooterSupport) 13 | 14 | - (void)loadMore; 15 | - (void)hideRead; 16 | - (void)hideAll; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+PopoverOptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+PopoverOptions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 15/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | 11 | @interface PostsViewController (PopoverOptions) 12 | 13 | @property (readonly) BOOL isSubscribedToSubreddit; 14 | @property (readonly) BOOL isNativeSubreddit; 15 | 16 | - (void)popupSubredditOptions; 17 | - (void)showAddSubredditToGroup; 18 | - (void)showSidebar; 19 | - (void)showMessageModsScreen; 20 | - (void)showGallery; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+PostInteraction.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+PostInteraction.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 10/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | #import "NPostCell.h" 11 | 12 | @interface PostsViewController (PostInteraction) 13 | - (void)toggleSavePostNode:(PostNode *)postNode; 14 | - (void)toggleHidePostNode:(PostNode *)postNode; 15 | - (void)voteUpPostNode:(PostNode *)postNode; 16 | - (void)voteDownPostNode:(PostNode *)postNode; 17 | - (void)reportPostNode:(PostNode *)postNode; 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+Sponsored.h: -------------------------------------------------------------------------------- 1 | #import "PostsViewController.h" 2 | 3 | @interface PostsViewController (Sponsored) 4 | 5 | - (void)initializeForSponsoredPostsIfNecessary; 6 | - (void)sponsored_viewDidLoad; 7 | - (void)sponsored_respondToStyleChange; 8 | - (void)sponsored_removeSponsoredAdsIfNecessary; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Sections/Posts/PostsViewController+State.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController+State.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | 11 | @interface PostsViewController (State) 12 | - (void)handleRestoringStateAutoscroll; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Posts/RedditAlienDrawing.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditAlienDrawing.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 6/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #include 10 | 11 | extern const CGFloat kDrawAlienHeadWidth; 12 | extern const CGFloat kDrawAlienHeadHeight; 13 | 14 | extern void DrawAlienHead(CGContextRef context, CGRect bounds, CGColorRef alienColor, CGFloat antennaLength, CGFloat angle1, CGFloat angle2); 15 | extern void DrawAlienLoadingIndicator(CGContextRef context, CGRect bounds, CGColorRef strokeColor, BOOL flipped); 16 | -------------------------------------------------------------------------------- /Source/Sections/Posts/SponsoredPostCell.h: -------------------------------------------------------------------------------- 1 | #import "NPostCell.h" 2 | #import 3 | 4 | @interface SponsoredPostCell : NPostCell 5 | 6 | - (void)handleStyleChange; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/Sections/Posts/ThumbOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThumbOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | 11 | @class Post; 12 | 13 | @interface ThumbOverlay : JMViewOverlay 14 | 15 | @property BOOL showRightArrow; 16 | @property BOOL allowLocalImageReplacement; 17 | @property (strong, readonly) NSString *url; 18 | 19 | - (void)updateWithUrl:(NSString *)url fallbackUrl:(NSString *)fallbackUrl showRetinaVersion:(BOOL)showRetinaVersion; 20 | - (void)updateWithPost:(Post *)post; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Posts/VotableElement+ModTools.h: -------------------------------------------------------------------------------- 1 | #import "VotableElement.h" 2 | 3 | @interface VotableElement (ModTools) 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/VotableElement+ModTools.m: -------------------------------------------------------------------------------- 1 | #import "VotableElement+ModTools.h" 2 | 3 | @implementation VotableElement (ModTools) 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Posts/VoteOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // VoteOverlay.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 15/12/11. 6 | // Copyright (c) 2011 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMViewOverlay.h" 10 | #import "VotableElement.h" 11 | 12 | #define kVoteOverlaySize CGSizeMake(46., 70.) 13 | 14 | @interface VoteOverlay : JMViewOverlay 15 | - (void)updateWithVotableElement:(VotableElement *)votableElement; 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/FoldersViewController+EditSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // FoldersViewController+EditSupport.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 11/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "FoldersViewController.h" 10 | 11 | @interface FoldersViewController (EditSupport) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/FoldersViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FoldersViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 11/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | #import "UserSubredditPreferences.h" 11 | 12 | @interface FoldersViewController : ABOutlineViewController 13 | @property (readonly, strong) UserSubredditPreferences *subredditPrefs; 14 | - (id)initWithSubredditPreferences:(UserSubredditPreferences *)subredditPrefs onComplete:(ABAction)onComplete; 15 | + (UINavigationController *)navControllerWithSubredditPreferences:(UserSubredditPreferences *)subredditPrefs onComplete:(ABAction)onComplete; 16 | - (void)animateFolderChanges; 17 | - (void)generateNodes; 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/MultiSubredditSelectorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultiSubredditSelectorViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/06/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | #import "SubredditFolder.h" 11 | 12 | @interface MultiSubredditSelectorViewController : ABOutlineViewController 13 | 14 | - (id)initWithSourceFolder:(SubredditFolder *)folder onComplete:(void (^)(NSArray *subreddits))onComplete; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NMyRedditInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NMyRedditInfoCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 13/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NBaseOptionCell.h" 10 | 11 | @interface MyRedditInfoNode : OptionNode 12 | @end 13 | 14 | @interface NMyRedditInfoCell : NBaseOptionCell 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NMyRedditInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // NMyRedditInfoCell.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 13/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NMyRedditInfoCell.h" 10 | 11 | @implementation MyRedditInfoNode 12 | 13 | + (Class)cellClass; 14 | { 15 | return NSClassFromString(@"NMyRedditInfoCell"); 16 | } 17 | 18 | @end 19 | 20 | @implementation NMyRedditInfoCell 21 | 22 | - (void)layoutCellOverlays; 23 | { 24 | [super layoutCellOverlays]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NSectionSpacerCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | 3 | typedef enum SectionSpacerDecoration { 4 | SectionSpacerDecorationNone, 5 | SectionSpacerDecorationDot, 6 | SectionSpacerDecorationLine, 7 | } SectionSpacerDecoration; 8 | 9 | @interface SectionSpacerNode : JMOutlineNode 10 | + (SectionSpacerNode *)spacerNode; 11 | + (SectionSpacerNode *)spacerNodeWithCustomHeight:(CGFloat)height decoration:(SectionSpacerDecoration)decoration; 12 | @property (strong) UIColor *backgroundColor; 13 | @property SectionSpacerDecoration spacerDecoration; 14 | @end 15 | 16 | @interface NSectionSpacerCell : JMOutlineCell 17 | @end 18 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NSectionTitleCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NRedditTitleCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | #import "NBaseOptionCell.h" 11 | 12 | @interface SectionTitleNode : OptionNode 13 | + (SectionTitleNode *)nodeForTitle:(NSString *)title; 14 | @property BOOL collapsable; 15 | @end 16 | 17 | @interface NSectionTitleCell : NBaseOptionCell 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NSubredditCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSubredditCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 7/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NBaseOptionCell.h" 10 | #import "Subreddit.h" 11 | 12 | @interface SubredditNode : OptionNode 13 | @property (strong) Subreddit *subreddit; 14 | @property BOOL hiddenThumbnail; 15 | - (id)initWithSubreddit:(Subreddit *)subreddit; 16 | + (SubredditNode *)nodeForSubreddit:(Subreddit *)subreddit; 17 | @end 18 | 19 | @interface NSubredditCell : NBaseOptionCell 20 | @property (readonly) Subreddit *subreddit; 21 | @property (strong) JMViewOverlay *thumbOverlay; 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/NSubredditFolderCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSubredditFolderCell.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 9/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NBaseOptionCell.h" 10 | #import "SubredditFolder.h" 11 | #import "NSectionTitleCell.h" 12 | 13 | @interface SubredditFolderNode : SectionTitleNode 14 | @property (strong) SubredditFolder *subredditFolder; 15 | @property (copy) ABAction onDoubleTap; 16 | + (SubredditFolderNode *)folderNodeForFolder:(SubredditFolder *)folder; 17 | @end 18 | 19 | @interface NSubredditFolderCell : NSectionTitleCell 20 | @end 21 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditAddController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditAddController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 25/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | #import "SubredditSelectorViewController.h" 11 | #import "SubredditFolder.h" 12 | 13 | @interface RedditAddController : ABOutlineViewController 14 | 15 | - (id)initWithDestinationFolder:(SubredditFolder *)folder; 16 | + (UINavigationController *)navControllerForAddingToSubredditFolder:(SubredditFolder *)folder; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditsViewController+Announcement.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController+Announcement.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 13/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController (Announcement) 12 | - (void)addAnnouncementSection; 13 | - (void)checkAnnouncements; 14 | - (void)apiAnnouncementCheckResponse:(id)sender; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditsViewController+Discovery.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController+Discovery.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController (Discovery) 12 | - (void)addDiscoverySection; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditsViewController+EditSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController+EditSupport.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 9/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController (EditSupport) 12 | 13 | - (void)enableEditMode; 14 | - (void)disableEditMode; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditsViewController+MyRedditInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController+MyRedditInfo.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 13/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController (MyRedditInfo) 12 | - (void)addInfoSection; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/RedditsViewController+Subscriptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController+Subscriptions.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 8/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | #import "AFHTTPRequestOperation.h" 11 | #import "UserSubredditPreferences.h" 12 | 13 | @interface RedditsViewController (Subscriptions) 14 | @property BOOL forceServerRefresh; 15 | @property BOOL isSyncing; 16 | @property (readonly) UserSubredditPreferences *subredditPrefs; 17 | @property (strong) AFHTTPRequestOperation *loadSubredditsOperation; 18 | 19 | 20 | - (void)syncSubscriptions; 21 | - (void)addRedditsSection; 22 | @end 23 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/Subreddit+API.h: -------------------------------------------------------------------------------- 1 | // 2 | // Subreddit+API.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 11/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Subreddit.h" 10 | #import "AFJSONRequestOperation.h" 11 | 12 | @interface Subreddit (API) 13 | + (AFHTTPRequestOperation *)fetchSubscribedSubredditsUsingCache:(BOOL)useCache onComplete:(void (^)(NSArray *subreddits))onComplete; 14 | + (AFHTTPRequestOperation *)fetchSubredditInformationForSubredditName:(NSString *)subredditName onComplete:(void (^)(Subreddit *subredditOrNil))onComplete; 15 | 16 | + (void)subscribeToSubredditWithUrl:(NSString *)url; 17 | + (void)unsubscribeToSubredditWithUrl:(NSString *)url; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/Subreddit+Moderation.h: -------------------------------------------------------------------------------- 1 | #import "Subreddit.h" 2 | 3 | typedef enum SubredditModFolder { 4 | SubredditModFolderDefault = 0, 5 | SubredditModFolderModQueue, 6 | SubredditModFolderRemoved, 7 | SubredditModFolderReported, 8 | SubredditModFolderUnmoderated, 9 | } SubredditModFolder; 10 | 11 | 12 | @interface Subreddit (Moderation) 13 | 14 | + (NSString *)moderationUrlForSubredditUrl:(NSString *)subredditUrl modFolder:(SubredditModFolder)modFolder; 15 | + (NSString *)friendlyNameForModerationFolder:(SubredditModFolder)modFolder; 16 | //+ (void)updateModeratedSubredditsUsingCache:(BOOL)useCache onComplete:(void(^)(NSArray *subreddits))onComplete; 17 | //+ (BOOL)isUserAllowedToModerateSubredditUrl:(NSString *)subredditUrl; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/SubredditFolder.h: -------------------------------------------------------------------------------- 1 | // 2 | // SubredditFolder.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 8/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Subreddit.h" 11 | 12 | @interface SubredditFolder : NSObject 13 | @property (strong) NSMutableArray *subreddits; 14 | @property (strong) NSString *title; 15 | @property (strong) NSString *ident; 16 | @property BOOL collapsed; 17 | 18 | + (SubredditFolder *)folderWithTitle:(NSString *)title; 19 | 20 | - (BOOL)containsSubreddit:(Subreddit *)subreddit; 21 | 22 | - (void)addSubreddit:(Subreddit *)subreddit; 23 | - (void)removeSubreddit:(Subreddit *)subreddit; 24 | - (void)insertSubreddit:(Subreddit *)subreddit atIndex:(NSUInteger)nIndex; 25 | 26 | - (void)sortAlphabetically; 27 | - (NSString *)aggregateUrl; 28 | @end 29 | -------------------------------------------------------------------------------- /Source/Sections/Reddits/SubredditSidebarViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "BrowserViewController_iPhone.h" 3 | 4 | @interface SubredditSidebarViewController : BrowserViewController_iPhone 5 | 6 | @property (copy, readonly) NSString *subredditName; 7 | 8 | -(id)initWithSubredditNamed:(NSString *)subredditName; 9 | - (void)apiSubredditsResponse:(id)sender; 10 | + (UINavigationController *) viewControllerWithNavigatonForSubredditName:(NSString *)subredditName; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ABGlobalNotificationKeys.h: -------------------------------------------------------------------------------- 1 | #define kNightModeSwitchNotification @"kNightModeSwitchNotification" 2 | #define kUserSwitchNotification @"kUserSwitchNotification" 3 | #define kTextSizeChangeNotification @"kTextSizeChangeNotification" 4 | #define kCanvasLaunchNotification @"kCanvasLaunchNotification" 5 | #define kCanvasExitNotification @"kCanvasExitNotification" 6 | #define kABAuthenticationStatusDidReceiveUpdatedUserInformation @"kABAuthenticationStatusDidReceiveUpdatedUserInformation" 7 | #define kABAuthenticationStatusDidSucceedNotification @"kABAuthenticationStatusDidSucceedNotification" 8 | #define kProUpgradeNotification @"kProUpgradeNotification" 9 | #define kRedditGroupsDidChangeNotification @"kRedditGroupsDidChangeNotification" 10 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ABShareConfigurator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ABShareConfigurator.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 27/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "DefaultSHKConfigurator.h" 10 | 11 | @interface ABShareConfigurator : DefaultSHKConfigurator 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ABShareConfigurator.m: -------------------------------------------------------------------------------- 1 | // 2 | // ABShareConfigurator.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 27/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABShareConfigurator.h" 10 | 11 | @implementation ABShareConfigurator 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/Settings/AnnouncementTextCell.h: -------------------------------------------------------------------------------- 1 | #import "NBaseStyledTextCell.h" 2 | 3 | @interface AnnouncementTextNode : BaseStyledTextNode 4 | - (id)initWithHTML:(NSString *)html; 5 | @end 6 | 7 | @interface AnnouncementTextCell : NBaseStyledTextCell 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/Sections/Settings/AnnouncementViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | 3 | @class Announcement; 4 | @interface AnnouncementViewController : ABOutlineViewController 5 | 6 | - (id)initWithAnnouncement:(Announcement *)announcement; 7 | 8 | + (void)showLatest; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Sections/Settings/EULAViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EULAViewController.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 1/02/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "BrowserViewController.h" 11 | 12 | @interface EULAViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ImgurManagerController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | 3 | @interface ImgurManagerController : ABOutlineViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ImgurManagerTableController.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010 __MyCompanyName__. All rights reserved. 2 | 3 | #import 4 | #import "NavigationManager.h" 5 | 6 | @interface ImgurManagerTableController : UITableViewController { 7 | UIImagePickerController *imagePickerController; 8 | UIImageView *chosenPhotoView; 9 | UIPopoverController *popover; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ImgurUploadCell.h: -------------------------------------------------------------------------------- 1 | #import "JMOutlineCell.h" 2 | #import "ImgurUploadRecord.h" 3 | 4 | @interface ImgurUploadNode : JMOutlineNode 5 | @property (copy) JMAction onGearIconTapAction; 6 | @property (strong, readonly) ImgurUploadRecord *uploadRecord; 7 | 8 | - (id)initWithUploadRecord:(ImgurUploadRecord *)uploadRecord; 9 | @end 10 | 11 | @interface ImgurUploadCell : JMOutlineCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ImgurUploadRecord.h: -------------------------------------------------------------------------------- 1 | @interface ImgurUploadRecord : NSObject 2 | 3 | @property (copy, readonly) NSString *smallThumbnailUrl; 4 | @property (copy, readonly) NSString *originalImageUrl; 5 | @property (copy, readonly) NSString *deleteHash; 6 | 7 | + (NSString *)originalImageUrlFromImgurResponseDictionary:(NSDictionary *)dictionary; 8 | 9 | + (void)storeUploadRecordWithImgurResponseDictionary:(NSDictionary *)dictionary; 10 | + (void)removeStoredUploadRecordForRecord:(ImgurUploadRecord *)record; 11 | 12 | + (NSArray *)imgurUploadRecords; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Source/Sections/Settings/JMEnumMapConfiguration.h: -------------------------------------------------------------------------------- 1 | #ifndef AlienBlue_JMEnumMapConfiguration_h 2 | #define AlienBlue_JMEnumMapConfiguration_h 3 | 4 | #define kJMEnumMapConfigurationEnumDefinitionFile "../../../Classes/Sections/Settings/enum-definitions.def" 5 | #define kJMEnumMapConfigurationEnumDescriptionFile "../../../Classes/Sections/Settings/enum-descriptions.def" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Source/Sections/Settings/ScreenLockSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenLockSettings.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 28/09/10. 6 | // Copyright 2010 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NavigationManager.h" 11 | #import "ABOutlineViewController.h" 12 | 13 | @interface ScreenLockSettings : ABOutlineViewController { 14 | IBOutlet UITextField *existingCodeTextField; 15 | IBOutlet UITextField *nCodeTextField; 16 | IBOutlet UITextField *confirmCodeTextField; 17 | IBOutlet UISwitch *passcodeSwitch; 18 | } 19 | 20 | @property (nonatomic, strong) IBOutlet UITextField *existingCodeTextField; 21 | @property (nonatomic, strong) IBOutlet UITextField *nCodeTextField; 22 | @property (nonatomic, strong) IBOutlet UITextField *confirmCodeTextField; 23 | @property (nonatomic, strong) IBOutlet UISwitch *passcodeSwitch; 24 | @end 25 | -------------------------------------------------------------------------------- /Source/Sections/Settings/SettingsViewController.h: -------------------------------------------------------------------------------- 1 | #import "ABOutlineViewController.h" 2 | #import "LegacySettingsTableViewController+LegacyDataSource.h" 3 | 4 | @interface SettingsViewController : ABOutlineViewController 5 | 6 | - (id)initWithSettingsSection:(SettingsSection)settingsSection; 7 | 8 | + (void)toggleNightTheme; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Util/REDColor.h: -------------------------------------------------------------------------------- 1 | // REDColor.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDColor : NSObject 7 | 8 | // Primary colors 9 | + (UIColor *)blueColor; 10 | 11 | // Neutrals 12 | + (UIColor *)whiteColor; 13 | + (UIColor *)offWhiteColor; 14 | + (UIColor *)paleGreyColor; 15 | + (UIColor *)neutralColor; 16 | + (UIColor *)greyColor; 17 | + (UIColor *)darkGreyColor; 18 | + (UIColor *)offBlackColor; 19 | + (UIColor *)semiBlackColor; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Source/Util/REDTodoPrompt.h: -------------------------------------------------------------------------------- 1 | // REDTodoPrompt.h 2 | // RedditApp 3 | 4 | #import 5 | 6 | @interface REDTodoPrompt : NSObject 7 | 8 | + (void)show; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Source/Util/REDTodoPrompt.m: -------------------------------------------------------------------------------- 1 | // REDTodoPrompt.m 2 | // RedditApp 3 | 4 | #import "RedditApp/Util/REDTodoPrompt.h" 5 | 6 | @implementation REDTodoPrompt 7 | 8 | + (void)show { 9 | [[[UIAlertView alloc] initWithTitle:@"Sorry!" 10 | message:@"This isn't implemented yet." 11 | delegate:nil 12 | cancelButtonTitle:@"OK :(" 13 | otherButtonTitles:nil] show]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/iPad/AppDelegate_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "AlienBlueAppDelegate.h" 10 | 11 | #define kContentPaneOpenedForPostNotification @"kContentPaneOpenedForPostNotification" 12 | 13 | @interface AppDelegate_iPad : AlienBlueAppDelegate 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/AppDelegate_iPad.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate_iPad.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate_iPad.h" 10 | #import "PostsNavigation_iPad.h" 11 | #import "NavigationManager_iPad.h" 12 | #import "UIApplication+ABAdditions.h" 13 | 14 | @interface AppDelegate_iPad() 15 | @end 16 | 17 | @implementation AppDelegate_iPad 18 | 19 | - (void)initWindow 20 | { 21 | self.navigationManager = [UNIVERSAL(NavigationManager) new]; 22 | [self.window setRootViewController:self.navigationManager.postsNavigation]; 23 | } 24 | 25 | - (void)splashViewWillHide; 26 | { 27 | DO_AFTER_WAITING(1., ^{ 28 | [UIApplication ab_updateStatusBarTintWithTransition]; 29 | }); 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Source/iPad/BrowserFooterView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // BrowserFooterView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 25/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NavigationBar_iPad.h" 10 | #import "ABButton.h" 11 | 12 | @interface BrowserFooterView_iPad : NavigationBar_iPad 13 | @property (strong) JMViewOverlay *backButtonOverlay; 14 | @property (strong) JMViewOverlay *refreshButtonOverlay; 15 | @property (strong) JMViewOverlay *forwardButtonOverlay; 16 | @property (strong) ABButton *optimalButton; 17 | @property (strong) ABButton *optimalSettingsButton; 18 | @end 19 | -------------------------------------------------------------------------------- /Source/iPad/BrowserHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // BrowserHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 20/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ContentHeaderView_iPad.h" 10 | 11 | @interface BrowserHeaderView_iPad : ContentHeaderView_iPad 12 | @property (strong) JMViewOverlay *commentsButton; 13 | @property (strong) JMViewOverlay *expandButtonOverlay; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/iPad/BrowserViewController_iPad+OptimalImage.h: -------------------------------------------------------------------------------- 1 | #import "BrowserViewController_iPad.h" 2 | 3 | @interface BrowserViewController_iPad (OptimalImage) 4 | 5 | - (void)configureContentViewForImageIfNecessary; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/iPad/BrowserViewController_iPad.h: -------------------------------------------------------------------------------- 1 | #import "BrowserViewController+State.h" 2 | 3 | @interface BrowserViewController_iPad : BrowserViewController 4 | @end 5 | -------------------------------------------------------------------------------- /Source/iPad/CommentAddSeparatorCell_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentAddSeparatorCell_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 23/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMOutlineCell.h" 10 | 11 | @interface CommentAddSeparatorNode : JMOutlineNode 12 | @end 13 | 14 | @interface CommentAddSeparatorCell_iPad : JMOutlineCell 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/CommentPostHeaderToolbar_iPad.h: -------------------------------------------------------------------------------- 1 | #import "CommentPostHeaderToolbar.h" 2 | 3 | @interface CommentPostHeaderToolbar_iPad : CommentPostHeaderToolbar 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPad/CommentsHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ContentHeaderView_iPad.h" 10 | 11 | @interface CommentsHeaderView_iPad : ContentHeaderView_iPad 12 | @property (strong) JMViewOverlay *expandButtonOverlay; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/CommentsViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommentsViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "CommentsViewController+State.h" 10 | 11 | @interface CommentsViewController_iPad : CommentsViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/ContentHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // ContentHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NavigationBar_iPad.h" 10 | #import "Post.h" 11 | 12 | #define kNavigationBarVoteStatusChanged @"kNavigationBarVoteStatusChanged" 13 | 14 | @interface ContentHeaderView_iPad : NavigationBar_iPad 15 | @property (readonly,strong) Post *post; 16 | @property (readonly,strong) JMViewOverlay *actionButton; 17 | @property (readonly,strong) UIBarButtonItem *actionBarButtonItemProxy; 18 | - (void)updateWithPost:(Post *)post; 19 | @end 20 | -------------------------------------------------------------------------------- /Source/iPad/DiscoveryAddController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryAddController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 17/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "DiscoveryAddController.h" 10 | 11 | @interface DiscoveryAddController_iPad : DiscoveryAddController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/DiscoveryHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NavigationBar_iPad.h" 10 | 11 | @interface DiscoveryHeaderView_iPad : NavigationBar_iPad 12 | @property (strong) UIActivityIndicatorView *loadingIndicator; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/DiscoveryHeaderView_iPad.m: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryHeaderView_iPad.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "DiscoveryHeaderView_iPad.h" 10 | 11 | @implementation DiscoveryHeaderView_iPad 12 | 13 | - (id)initWithFrame:(CGRect)frame; 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) 17 | { 18 | self.loadingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 19 | self.loadingIndicator.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; 20 | [self.contentView addSubview:self.loadingIndicator]; 21 | self.loadingIndicator.top = 17.; 22 | self.loadingIndicator.right = self.contentView.width - 14.; 23 | } 24 | return self; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/iPad/DiscoverySceneController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoverySceneController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "DiscoverySceneController.h" 10 | 11 | @interface DiscoverySceneController_iPad : DiscoverySceneController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/FullScreenPhotoViewer_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // FullScreenPhotoViewer_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 26/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FullScreenPhotoViewer_iPad : UIViewController 12 | - (id)initWithImage:(UIImage *)image; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/FullscreenGalleryController_iPad.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "JMGalleryViewController.h" 3 | 4 | extern NSString *JMFullscreenGalleryDeeplinkFromURL(NSURL *linkURL); 5 | extern NSString *JMFullscreenGalleryThumbnailFromURL(NSURL *linkURL); 6 | 7 | @interface FullscreenGalleryController_iPad : JMGalleryViewController 8 | 9 | - (id)initWithImageUrls:(NSArray *)imageUrls startingAtIndex:(NSUInteger)startingIndex; 10 | - (id)initWithGalleryItems:(NSArray *)galleryItems startingAtIndex:(NSUInteger)startingIndex; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/iPad/GalleryViewController_iPad.h: -------------------------------------------------------------------------------- 1 | #import "GalleryViewController.h" 2 | 3 | @interface GalleryViewController_iPad : GalleryViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPad/GestureTutorialViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GestureTutorialViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 5/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GestureTutorialViewController : UIViewController 12 | @end 13 | -------------------------------------------------------------------------------- /Source/iPad/LoginPasswordController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginPasswordController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "ABOutlineViewController.h" 10 | 11 | @interface LoginPasswordController_iPad : ABOutlineViewController 12 | - (id)initWithUsername:(NSString *)username password:(NSString *)password; 13 | - (void)setCallbackTarget:(id)callbackTarget forAccountIndex:(NSInteger)accountIndex; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/iPad/MessagesViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessagesTableViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 1/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "MessagesViewController.h" 10 | 11 | @interface MessagesViewController_iPad : MessagesViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/NCommentCell_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // NCommentCell_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 20/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NCommentCell.h" 10 | 11 | @interface NCommentCell_iPad : NCommentCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/NCommentPostHeaderCell_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // NCommentPostHeaderCell_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 20/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NCommentPostHeaderCell.h" 10 | 11 | @interface NCommentPostHeaderCell_iPad : NCommentPostHeaderCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/NPostCell_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // NPostCell_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 16/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NPostCell.h" 10 | 11 | @interface NPostCell_iPad : NPostCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/NavigationBar_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationBar_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "OverlayViewContainer.h" 10 | 11 | #define kNavigationHeaderPadding 15. 12 | 13 | @interface NavigationBar_iPad : OverlayViewContainer 14 | @property (readonly, strong) JMViewOverlay *titleOverlay; 15 | 16 | @property (strong) NSString *title; 17 | @property (strong) UIView *contentView; 18 | @property BOOL straightEdged; 19 | @property CGFloat shadowTriggerOffset; 20 | - (void)updateWithContentOffset:(CGPoint)offset; 21 | - (void)respondToStyleChangeNotification; 22 | - (UIViewController *)controller; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/iPad/NotificationBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationBar.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NotificationBar : UIView 12 | - (void)setMessage:(NSString *)message; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/OptionCellView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // OptionCellView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "OptionCellView.h" 10 | 11 | @interface OptionCellView_iPad : OptionCellView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/OptionCellView_iPad.m: -------------------------------------------------------------------------------- 1 | // 2 | // OptionCellView_iPad.m 3 | // AlienBlue 4 | // 5 | // Created by J M on 18/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "OptionCellView_iPad.h" 10 | #import "Resources.h" 11 | 12 | @implementation OptionCellView_iPad 13 | 14 | - (void)drawTitleBackground; 15 | { 16 | // draw header background 17 | CGRect bgRect = CGRectOffset(CGRectInset(self.bounds,0, 2.), 0, -10.); 18 | [[UIColor colorForBackground] set]; 19 | [[UIBezierPath bezierPathWithRect:bgRect] fill]; 20 | 21 | [UIView startEtchedDraw]; 22 | 23 | [[UIColor colorForDivider] set]; 24 | [[UIBezierPath bezierPathWithRect:CGRectMake(14., self.bounds.size.height - 13., self.bounds.size.width - 28, 1.)] fill]; 25 | 26 | [UIView endEtchedDraw]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Source/iPad/PortraitTipViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PortraitTipViewController.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 4/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PortraitTipViewController : UIViewController 12 | + (PortraitTipViewController *)controller; 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/Post+Style_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Post+Style_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 20/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "Post.h" 10 | 11 | @interface Post (Style_iPad) 12 | - (void)drawSubdetailsInRect_iPad:(CGRect)rect context:(CGContextRef)context; 13 | - (NSAttributedString *)styledTitleWithDetails_iPad; 14 | @end 15 | -------------------------------------------------------------------------------- /Source/iPad/PostsHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 15/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NavigationBar_iPad.h" 11 | 12 | @class Subreddit; 13 | 14 | @interface PostsHeaderView_iPad : NavigationBar_iPad 15 | @property (strong, readonly) JMViewOverlay *searchButton; 16 | @property (strong, readonly) JMViewOverlay *createPostButton; 17 | @property (strong, readonly) JMViewOverlay *showCanvasButton; 18 | @property (strong, readonly) JMViewOverlay *subredditIconOverlay; 19 | 20 | - (id)initWithFrame:(CGRect)frame forSubreddit:(Subreddit *)subreddit; 21 | @end 22 | -------------------------------------------------------------------------------- /Source/iPad/PostsNavigation_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsNavigation_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "JMFNNavigationController.h" 10 | #import "SidePane_iPad.h" 11 | 12 | @interface PostsNavigation_iPad : JMFNNavigationController 13 | @property (readonly) BOOL showingSidePane; 14 | @property (strong,readonly) SidePane_iPad *sidePane; 15 | @property (strong) UIToolbar *toolbar; 16 | - (void)setPaneTitle:(NSString *)title; 17 | 18 | - (void)hideSidePaneAnimated:(BOOL)animated showingRevealButton:(BOOL)showingRevealButton; 19 | - (void)showSidePaneAnimated:(BOOL)animated; 20 | 21 | - (void)hideNotification; 22 | - (void)showNotification:(NSString *)message; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Source/iPad/PostsViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostsViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 15/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "PostsViewController.h" 10 | #import "JMFoldingNavigation.h" 11 | 12 | @interface PostsViewController_iPad : PostsViewController 13 | - (BOOL)isContentPaneOpenForPost:(Post *)post; 14 | - (void)scrollToLastTouchedPost; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/RedditAddController_iPad.h: -------------------------------------------------------------------------------- 1 | #import "RedditAddController.h" 2 | 3 | @interface RedditAddController_iPad : RedditAddController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPad/RedditAddController_iPad.m: -------------------------------------------------------------------------------- 1 | #import "RedditAddController_iPad.h" 2 | #import "NavigationManager_iPad.h" 3 | 4 | @interface RedditAddController_iPad () 5 | 6 | @end 7 | 8 | @implementation RedditAddController_iPad 9 | 10 | - (void)dismiss; 11 | { 12 | [[NavigationManager shared] dismissPopoverIfNecessary]; 13 | } 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Source/iPad/RedditsFooterView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsFooterView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NavigationBar_iPad.h" 10 | #import "OverlayViewContainer.h" 11 | 12 | @interface RedditsFooterView_iPad : NavigationBar_iPad 13 | @property (strong) JMViewOverlay *foldersButtonOverlay; 14 | @property (strong) JMViewOverlay *sortButtonOverlay; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/RedditsHeaderView_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsHeaderView_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 19/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "NavigationBar_iPad.h" 10 | 11 | @interface RedditsHeaderView_iPad : NavigationBar_iPad 12 | @property (strong) JMViewOverlay *editOverlay; 13 | @property (strong) JMViewOverlay *doneOverlay; 14 | - (void)switchMode; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/RedditsViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 14/04/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController_iPad : RedditsViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/SettingsViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 2/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "SettingsViewController.h" 10 | 11 | @interface SettingsViewController_iPad : SettingsViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPad/SidePaneBezelButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SidePaneBezelButton.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 22/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SidePaneBezelButton : UIControl 12 | @property (readonly) NSString *title; 13 | @property BOOL alternatePresentation; 14 | - (void)setPaneTitle:(NSString *)title; 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPad/SidePane_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // SidePane_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 21/02/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ABButton.h" 11 | 12 | #define kSidePaneNeedsRefreshNotification @"kSidePaneNeedsRefreshNotification" 13 | #define kSidePaneWidth 52 14 | 15 | @interface SidePane_iPad : UIView 16 | @property (strong,readonly) ABButton *tipButton; 17 | - (void)setPaneTitle:(NSString *)paneTitle; 18 | + (BOOL)shouldDisplayAnnouncementBanner; 19 | @end 20 | -------------------------------------------------------------------------------- /Source/iPad/SlidingDragReleaseProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingDragReleaseCompatible.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 23/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol SlidingDragReleaseProtocol 12 | - (BOOL)canDragRelease; 13 | - (NSString *)titleForDragReleaseLabel; 14 | - (void)didDragRelease; 15 | 16 | @optional 17 | 18 | - (NSString *)iconNameForDragReleaseDestination; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Source/iPad/SponsoredPostCell_iPad.h: -------------------------------------------------------------------------------- 1 | #import "SponsoredPostCell.h" 2 | 3 | @interface SponsoredPostCell_iPad : SponsoredPostCell 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPad/SubredditSidebarViewController_iPad.h: -------------------------------------------------------------------------------- 1 | #import "SubredditSidebarViewController.h" 2 | 3 | @interface SubredditSidebarViewController_iPad : SubredditSidebarViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPad/UserDetailsViewController_iPad.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserDetailsViewController_iPad.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 1/03/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "UserDetailsViewController.h" 10 | 11 | @interface UserDetailsViewController_iPad : UserDetailsViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPhone/BrowserNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | #import "JMOptimalToolbarCoordinator.h" 3 | 4 | @class Post; 5 | @interface BrowserNavigationBar : ABCustomOutlineNavigationBar 6 | 7 | @property (copy) JMAction onCommentButtonTap; 8 | @property (copy) void(^onOptimalSwitchChange)(BOOL didChangeToOptimal); 9 | 10 | - (void)updateWithWithToolbarCoordinator:(JMOptimalToolbarCoordinator *)optimalToolbarCoordinator forPost:(Post *)post displaysOptimalByDefault:(BOOL)displaysOptimalByDefault hidesOptimalBar:(BOOL)hidesOptimalBar; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Source/iPhone/BrowserViewController_iPhone.h: -------------------------------------------------------------------------------- 1 | #import "BrowserViewController.h" 2 | 3 | @interface BrowserViewController_iPhone : BrowserViewController 4 | 5 | - (void)userDidToggleOptimalSwitch:(BOOL)didChangeToOptimal; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/iPhone/CommentsNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | 3 | @interface CommentsNavigationBar : ABCustomOutlineNavigationBar 4 | 5 | - (void)setLegacyCommentHeaderBar:(UIView *)legacyCommentHeaderBar; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/iPhone/CommentsViewController_iPhone.h: -------------------------------------------------------------------------------- 1 | #import "CommentsViewController.h" 2 | 3 | @interface CommentsViewController_iPhone : CommentsViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPhone/CommentsViewController_iPhone.m: -------------------------------------------------------------------------------- 1 | #import "CommentsViewController_iPhone.h" 2 | #import "CommentPostHeaderToolbar.h" 3 | #import "CommentsViewController+ReplyInteraction.h" 4 | 5 | @interface CommentsViewController_iPhone() 6 | 7 | @end 8 | 9 | @implementation CommentsViewController_iPhone 10 | 11 | - (void)loadView; 12 | { 13 | [super loadView]; 14 | } 15 | 16 | - (void)commentsDidFinishLoading; 17 | { 18 | [super commentsDidFinishLoading]; 19 | 20 | } 21 | 22 | - (void)respondToStyleChange; 23 | { 24 | [super respondToStyleChange]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Source/iPhone/GalleryViewController_iPhone.h: -------------------------------------------------------------------------------- 1 | #import "GalleryViewController.h" 2 | 3 | @interface GalleryViewController_iPhone : GalleryViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPhone/GalleryViewController_iPhone.m: -------------------------------------------------------------------------------- 1 | #import "GalleryViewController_iPhone.h" 2 | 3 | @interface GalleryViewController_iPhone() 4 | 5 | @end 6 | 7 | @implementation GalleryViewController_iPhone 8 | 9 | - (void)viewDidLoad; 10 | { 11 | [super viewDidLoad]; 12 | [self switchToGridFromGalleryItem:nil animated:NO]; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPhone/GenericNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | 3 | @interface GenericNavigationBar : ABCustomOutlineNavigationBar 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPhone/GenericNavigationBar.m: -------------------------------------------------------------------------------- 1 | #import "GenericNavigationBar.h" 2 | 3 | @implementation GenericNavigationBar 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPhone/HomeNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | 3 | @interface HomeNavigationBar : ABCustomOutlineNavigationBar 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Source/iPhone/MessagesNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | 3 | @interface MessagesNavigationBar : ABCustomOutlineNavigationBar 4 | 5 | @property (copy) JMAction onMarkAsReadTap; 6 | - (void)attachBoxTabView:(UIView *)boxTabView; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Source/iPhone/NPostCell_iPhone.h: -------------------------------------------------------------------------------- 1 | // 2 | // NPostCell_iPhone.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 28/12/12. 6 | // 7 | // 8 | 9 | #import "NPostCell.h" 10 | 11 | @interface NPostCell_iPhone : NPostCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPhone/NavigationBackItemView.h: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationBackItemView.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 6/12/12. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NavigationBackItemView : UIControl 12 | 13 | - (id)initWithNavigationItem:(UINavigationItem *)navigationItem; 14 | 15 | + (UIImage *)imageForBackButton; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Source/iPhone/Post+Style_iPhone.h: -------------------------------------------------------------------------------- 1 | // 2 | // Post+Style_iPhone.h 3 | // AlienBlue 4 | // 5 | // Created by JM on 28/12/12. 6 | // 7 | // 8 | 9 | #import "Post.h" 10 | 11 | @interface Post (Style_iPhone) 12 | 13 | - (void)drawSubdetailsInRect_iPhone:(CGRect)rect context:(CGContextRef)context; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Source/iPhone/PostsNavigationBar.h: -------------------------------------------------------------------------------- 1 | #import "ABCustomOutlineNavigationBar.h" 2 | 3 | @interface PostsNavigationBar : ABCustomOutlineNavigationBar 4 | 5 | - (void)setSearchHeaderBar:(UIView *)searchHeaderBar; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Source/iPhone/RedditsViewController_iPhone.h: -------------------------------------------------------------------------------- 1 | // 2 | // RedditsViewController_iPhone.h 3 | // AlienBlue 4 | // 5 | // Created by J M on 8/05/12. 6 | // Copyright (c) 2012 The Design Shed. All rights reserved. 7 | // 8 | 9 | #import "RedditsViewController.h" 10 | 11 | @interface RedditsViewController_iPhone : RedditsViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/iPhone/SlideableNavigationEdgeView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SlideableNavigationEdgeView : UIView 4 | 5 | @property (readonly, strong) UILabel *instructionLabel; 6 | @property (readonly, strong) UIImageView *iconView; 7 | @property (readonly, strong) UIView *highlightView; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Source/main.m: -------------------------------------------------------------------------------- 1 | // main.m 2 | // Reddit 3 | 4 | #import 5 | 6 | #import "RedditApp/REDRedditAppDelegate.h" 7 | 8 | int main(int argc, char* argv[]) { 9 | @autoreleasepool { 10 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([REDRedditAppDelegate class])); 11 | } 12 | } 13 | --------------------------------------------------------------------------------