NewsBlur/clients/ios/Classes/PremiumViewController.h
David Sinclair 7c33270c5b iOS: premium manager
Purchases could fail if they require approval, and complete after leaving the premium view, or on next app launch. So I’ve split the premium business logic into a separate manager that maintains a permanent transaction observer.
2018-10-04 17:00:22 -07:00

41 lines
1.4 KiB
Objective-C

//
// PremiumViewController.h
// NewsBlur
//
// Created by Samuel Clay on 11/9/17.
// Copyright © 2017 NewsBlur. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "NewsBlurAppDelegate.h"
@class SAConfettiView;
@interface PremiumViewController : BaseViewController <UITableViewDelegate, UITableViewDataSource> {
NewsBlurAppDelegate *appDelegate;
}
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic) IBOutlet UIActivityIndicatorView *spinner;
@property (nonatomic) IBOutlet UITableView *productsTable;
@property (nonatomic) IBOutlet UITableView *reasonsTable;
@property (nonatomic) IBOutlet UINavigationBar *navigationBar;
@property (nonatomic) IBOutlet UIBarButtonItem *doneButton;
@property (nonatomic) IBOutlet UIBarButtonItem *restoreButton;
@property (nonatomic) IBOutlet UIView *freeView;
@property (nonatomic) IBOutlet UIView *premiumView;
@property (nonatomic) IBOutlet SAConfettiView *confettiView;
@property (nonatomic) IBOutlet NSLayoutConstraint *productsHeight;
@property (nonatomic) IBOutlet UILabel *labelTitle;
@property (nonatomic) IBOutlet UILabel *labelSubtitle;
@property (nonatomic) IBOutlet UILabel *labelPremiumTitle;
@property (nonatomic) IBOutlet UILabel *labelPremiumExpire;
- (IBAction)closeDialog:(id)sender;
- (IBAction)restorePurchase:(id)sender;
- (void)loadedProducts;
- (void)finishedTransaction;
@end