Fixing all ios8 warnings. v7.0.0 is ready to go to TestFlight!

This commit is contained in:
Samuel Clay 2017-04-11 16:15:18 -07:00
parent 5fc86097dd
commit 1369740713
30 changed files with 552 additions and 261 deletions

View file

@ -186,7 +186,7 @@
- (IBAction)toggleAutoFollowFriends:(id)sender {
UISwitch *button = (UISwitch *)sender;
NSURL *urlString = [NSString stringWithFormat:@"%@/profile/set_preference", self.appDelegate.url];
NSString *urlString = [NSString stringWithFormat:@"%@/profile/set_preference", self.appDelegate.url];
NSMutableDictionary *params = [NSMutableDictionary dictionary];
if (button.on) {

View file

@ -47,7 +47,7 @@
}
NSString *collapseKey = [NSString stringWithFormat:@"folderCollapsed:%@", folderName];
bool isFolderCollapsed = [userPreferences boolForKey:collapseKey];
int countWidth = 0;
NSInteger countWidth = 0;
NSString *accessibilityCount = @"";
if ([folderName isEqual:@"saved_stories"]) {

View file

@ -1790,7 +1790,9 @@
}
- (BOOL)isFeedInTextView:(id)feedId {
return [self.dictTextFeeds objectForKey:feedId];
id text = [self.dictTextFeeds objectForKey:feedId];
if (text != nil) return text;
return NO;
}
- (void)toggleFeedTextView:(id)feedId {

View file

@ -122,8 +122,8 @@ UIGestureRecognizerDelegate> {
- (void)showRefreshNotifier;
- (void)showCountingNotifier;
- (void)showSyncingNotifier;
- (void)showSyncingNotifier:(float)progress hoursBack:(int)days;
- (void)showCachingNotifier:(float)progress hoursBack:(int)hours;
- (void)showSyncingNotifier:(float)progress hoursBack:(NSInteger)days;
- (void)showCachingNotifier:(float)progress hoursBack:(NSInteger)hours;
- (void)showOfflineNotifier;
- (void)showDoneNotifier;
- (void)hideNotifier;

View file

@ -2066,13 +2066,13 @@ heightForHeaderInSection:(NSInteger)section {
[self finishRefresh];
}
- (void)showSyncingNotifier:(float)progress hoursBack:(int)hours {
- (void)showSyncingNotifier:(float)progress hoursBack:(NSInteger)hours {
// [self.notifier hide];
self.notifier.style = NBSyncingProgressStyle;
if (hours < 2) {
self.notifier.title = @"Storing past hour";
} else if (hours < 24) {
self.notifier.title = [NSString stringWithFormat:@"Storing past %d hours", hours];
self.notifier.title = [NSString stringWithFormat:@"Storing past %ld hours", (long)hours];
} else if (hours < 48) {
self.notifier.title = @"Storing yesterday";
} else {
@ -2083,13 +2083,13 @@ heightForHeaderInSection:(NSInteger)section {
[self.notifier show];
}
- (void)showCachingNotifier:(float)progress hoursBack:(int)hours {
- (void)showCachingNotifier:(float)progress hoursBack:(NSInteger)hours {
// [self.notifier hide];
self.notifier.style = NBSyncingProgressStyle;
if (hours < 2) {
self.notifier.title = @"Images from last hour";
} else if (hours < 24) {
self.notifier.title = [NSString stringWithFormat:@"Images from %d hours ago", hours];
self.notifier.title = [NSString stringWithFormat:@"Images from %ld hours ago", (long)hours];
} else if (hours < 48) {
self.notifier.title = @"Images from yesterday";
} else {

View file

@ -1993,6 +1993,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
if (success) {
[self flashCheckmarkHud:@"saved"];
} else {
[MBProgressHUD hideHUDForView:self.webView animated:NO];
[self informError:error];
}
});

View file

@ -21,17 +21,17 @@ typedef enum {
} NBFeedListType;
@property (nonatomic) NewsBlurAppDelegate *appDelegate;
@property (assign, nonatomic) int psWidth;
@property (assign, nonatomic) int psPadding;
@property (assign, nonatomic) int ntWidth;
@property (assign, nonatomic) int ntPadding;
@property (assign, nonatomic) int psCount;
@property (assign, nonatomic) int ntCount;
@property (assign, nonatomic) int blueCount;
@property (assign, nonatomic) NSInteger psWidth;
@property (assign, nonatomic) NSInteger psPadding;
@property (assign, nonatomic) NSInteger ntWidth;
@property (assign, nonatomic) NSInteger ntPadding;
@property (assign, nonatomic) NSInteger psCount;
@property (assign, nonatomic) NSInteger ntCount;
@property (assign, nonatomic) NSInteger blueCount;
@property (assign, nonatomic) CGRect rect;
- (void)drawInRect:(CGRect)r ps:(int)ps nt:(int)nt listType:(NBFeedListType)listType;
- (void)calculateOffsets:(int)ps nt:(int)nt;
- (int)offsetWidth;
- (void)drawInRect:(CGRect)r ps:(NSInteger)ps nt:(NSInteger)nt listType:(NBFeedListType)listType;
- (void)calculateOffsets:(NSInteger)ps nt:(NSInteger)nt;
- (NSInteger)offsetWidth;
@end

View file

@ -32,7 +32,7 @@ const int COUNT_HEIGHT = 15;
return [self drawInRect:r ps:psCount nt:ntCount listType:NBFeedListFolder];
}
- (void)drawInRect:(CGRect)r ps:(int)ps nt:(int)nt listType:(NBFeedListType)listType {
- (void)drawInRect:(CGRect)r ps:(NSInteger)ps nt:(NSInteger)nt listType:(NBFeedListType)listType {
rect = CGRectInset(r, 12, 12);
rect.size.width -= 18; // Scrollbar padding
@ -47,8 +47,8 @@ const int COUNT_HEIGHT = 15;
}
[self calculateOffsets:ps nt:nt];
int psOffset = ps == 0 ? 0 : psWidth - 20;
int ntOffset = nt == 0 ? 0 : ntWidth - 20;
NSInteger psOffset = ps == 0 ? 0 : psWidth - 20;
NSInteger ntOffset = nt == 0 ? 0 : ntWidth - 20;
if (ps > 0 || blueCount) {
CGRect rr;
@ -81,7 +81,7 @@ const int COUNT_HEIGHT = 15;
[UIView drawRoundRectangleInRect:rr withRadius:4];
NSString *psStr = [NSString stringWithFormat:@"%d", ps];
NSString *psStr = [NSString stringWithFormat:@"%ld", (long)ps];
CGSize size = [psStr sizeWithAttributes:@{NSFontAttributeName: indicatorFont}];
float x_pos = (rr.size.width - size.width) / 2;
float y_pos = (rr.size.height - size.height) / 2;
@ -125,7 +125,7 @@ const int COUNT_HEIGHT = 15;
[UIColorFromLightDarkRGB(0xB3B6AD, 0xA3A69D) set];
[UIView drawRoundRectangleInRect:rr withRadius:4];
NSString *ntStr = [NSString stringWithFormat:@"%d", nt];
NSString *ntStr = [NSString stringWithFormat:@"%ld", (long)nt];
CGSize size = [ntStr sizeWithAttributes:@{NSFontAttributeName: indicatorFont}];
float x_pos = (rr.size.width - size.width) / 2;
float y_pos = (rr.size.height - size.height) / 2;
@ -142,7 +142,7 @@ const int COUNT_HEIGHT = 15;
}
}
- (void)calculateOffsets:(int)ps nt:(int)nt {
- (void)calculateOffsets:(NSInteger)ps nt:(NSInteger)nt {
psWidth = ps == 0 ? 0 : ps < 10 ? 14 : ps < 100 ? 22 : ps < 1000 ? 28 : ps < 10000 ? 34 : 40;
ntWidth = nt == 0 ? 0 : nt < 10 ? 14 : nt < 100 ? 22 : nt < 1000 ? 28 : nt < 10000 ? 34 : 40;
@ -150,8 +150,8 @@ const int COUNT_HEIGHT = 15;
ntPadding = nt == 0 ? 0 : 2;
}
- (int)offsetWidth {
int width = 0;
- (NSInteger)offsetWidth {
NSInteger width = 0;
if (self.psCount > 0) {
width += psWidth + psPadding;
}

View file

@ -130,10 +130,10 @@
- (void)updateProgress {
if (self.isCancelled) return;
int start = (int)[[NSDate date] timeIntervalSince1970];
int end = appDelegate.latestFetchedStoryDate;
int seconds = start - (end ? end : start);
__block int hours = (int)round(seconds / 60.f / 60.f);
NSInteger start = (int)[[NSDate date] timeIntervalSince1970];
NSInteger end = appDelegate.latestFetchedStoryDate;
NSInteger seconds = start - (end ? end : start);
__block NSInteger hours = (int)round(seconds / 60.f / 60.f);
__block float progress = 0.f;
if (appDelegate.totalUnfetchedStoryCount) {

View file

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>NewsBlur can save photos to your camera roll by long pressing them.</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
@ -21,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>6.1.1</string>
<string>7.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@ -60,7 +58,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>68</string>
<string>69</string>
<key>FacebookAppID</key>
<string>230426707030569</string>
<key>ITSAppUsesNonExemptEncryption</key>
@ -96,6 +94,8 @@
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow~ipad</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>NewsBlur can save photos to your camera roll by long pressing them.</string>
<key>UIAppFonts</key>
<array>
<string>WhitneySSm-MediumItalic-Bas.otf</string>

View file

@ -304,27 +304,29 @@
FF2D8B351487250C00057B80 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2D8B341487250C00057B80 /* MessageUI.framework */; };
FF2D8C6C1487F05100057B80 /* Twitter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2D8C6B1487F05100057B80 /* Twitter.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
FF2D8CE514893BC000057B80 /* MoveSiteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2D8CE314893BBF00057B80 /* MoveSiteViewController.m */; };
FF2EB7B01AA65504002549A7 /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7811AA65504002549A7 /* IASKAppSettingsViewController.m */; };
FF2EB7B11AA65504002549A7 /* IASKAppSettingsWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7831AA65504002549A7 /* IASKAppSettingsWebViewController.m */; };
FF2EB7B21AA65504002549A7 /* IASKMultipleValueSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7851AA65504002549A7 /* IASKMultipleValueSelection.m */; };
FF2EB7B31AA65504002549A7 /* IASKSpecifierValuesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7871AA65504002549A7 /* IASKSpecifierValuesViewController.m */; };
FF2EB7B41AA65504002549A7 /* IASKSettingsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB78B1AA65504002549A7 /* IASKSettingsReader.m */; };
FF2EB7B51AA65504002549A7 /* IASKSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB78D1AA65504002549A7 /* IASKSettingsStore.m */; };
FF2EB7B61AA65504002549A7 /* IASKSettingsStoreFile.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB78F1AA65504002549A7 /* IASKSettingsStoreFile.m */; };
FF2EB7B71AA65504002549A7 /* IASKSettingsStoreUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7911AA65504002549A7 /* IASKSettingsStoreUserDefaults.m */; };
FF2EB7B81AA65504002549A7 /* IASKSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7931AA65504002549A7 /* IASKSpecifier.m */; };
FF2EB7B91AA65504002549A7 /* IASKLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = FF2EB7951AA65504002549A7 /* IASKLocalizable.strings */; };
FF2EB7BA1AA65504002549A7 /* IASKPSSliderSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7A71AA65504002549A7 /* IASKPSSliderSpecifierViewCell.m */; };
FF2EB7BB1AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7A91AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.m */; };
FF2EB7BC1AA65504002549A7 /* IASKSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7AB1AA65504002549A7 /* IASKSlider.m */; };
FF2EB7BD1AA65504002549A7 /* IASKSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7AD1AA65504002549A7 /* IASKSwitch.m */; };
FF2EB7BE1AA65504002549A7 /* IASKTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = FF2EB7AF1AA65504002549A7 /* IASKTextField.m */; };
FF308A7B18C01014009F986A /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF308A7A18C01014009F986A /* AssetsLibrary.framework */; };
FF308A7D18C01025009F986A /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF308A7C18C01025009F986A /* CoreMotion.framework */; };
FF308A7F18C01037009F986A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF308A7E18C01037009F986A /* CoreLocation.framework */; };
FF308A8118C01043009F986A /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF308A8018C01043009F986A /* MediaPlayer.framework */; };
FF322235185BC1AA004078AA /* logo_58.png in Resources */ = {isa = PBXBuildFile; fileRef = FF322234185BC1AA004078AA /* logo_58.png */; };
FF322237185BC1CE004078AA /* logo_80.png in Resources */ = {isa = PBXBuildFile; fileRef = FF322236185BC1CE004078AA /* logo_80.png */; };
FF34FD601E9D93CB0062F8ED /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD2D1E9D93CB0062F8ED /* IASKAppSettingsViewController.m */; };
FF34FD611E9D93CB0062F8ED /* IASKAppSettingsWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD2F1E9D93CB0062F8ED /* IASKAppSettingsWebViewController.m */; };
FF34FD621E9D93CB0062F8ED /* IASKMultipleValueSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD311E9D93CB0062F8ED /* IASKMultipleValueSelection.m */; };
FF34FD631E9D93CB0062F8ED /* IASKSpecifierValuesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD331E9D93CB0062F8ED /* IASKSpecifierValuesViewController.m */; };
FF34FD641E9D93CB0062F8ED /* IASKSettingsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD371E9D93CB0062F8ED /* IASKSettingsReader.m */; };
FF34FD651E9D93CB0062F8ED /* IASKSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD391E9D93CB0062F8ED /* IASKSettingsStore.m */; };
FF34FD661E9D93CB0062F8ED /* IASKSettingsStoreFile.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD3B1E9D93CB0062F8ED /* IASKSettingsStoreFile.m */; };
FF34FD671E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD3D1E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.m */; };
FF34FD681E9D93CB0062F8ED /* IASKSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD3F1E9D93CB0062F8ED /* IASKSpecifier.m */; };
FF34FD691E9D93CB0062F8ED /* IASKLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = FF34FD411E9D93CB0062F8ED /* IASKLocalizable.strings */; };
FF34FD6A1E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD531E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.m */; };
FF34FD6B1E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD551E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.m */; };
FF34FD6C1E9D93CB0062F8ED /* IASKSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD571E9D93CB0062F8ED /* IASKSlider.m */; };
FF34FD6D1E9D93CB0062F8ED /* IASKSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD591E9D93CB0062F8ED /* IASKSwitch.m */; };
FF34FD6E1E9D93CB0062F8ED /* IASKTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD5B1E9D93CB0062F8ED /* IASKTextField.m */; };
FF34FD6F1E9D93CB0062F8ED /* IASKTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD5D1E9D93CB0062F8ED /* IASKTextView.m */; };
FF34FD701E9D93CB0062F8ED /* IASKTextViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FF34FD5F1E9D93CB0062F8ED /* IASKTextViewCell.m */; };
FF3964BC192BED0A004BEE1A /* tag.png in Resources */ = {isa = PBXBuildFile; fileRef = FF3964BB192BED0A004BEE1A /* tag.png */; };
FF3A3E091BFBBB5100ADC01A /* ChronicleSSm-Book.otf in Resources */ = {isa = PBXBuildFile; fileRef = FF3A3DEF1BFBBAC600ADC01A /* ChronicleSSm-Book.otf */; };
FF3A3E0A1BFBBB5400ADC01A /* ChronicleSSm-BookItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = FF3A3DF01BFBBAC600ADC01A /* ChronicleSSm-BookItalic.otf */; };
@ -965,56 +967,60 @@
FF2D8C6B1487F05100057B80 /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; };
FF2D8CE214893BBF00057B80 /* MoveSiteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoveSiteViewController.h; sourceTree = "<group>"; };
FF2D8CE314893BBF00057B80 /* MoveSiteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoveSiteViewController.m; sourceTree = "<group>"; };
FF2EB7801AA65504002549A7 /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = "<group>"; };
FF2EB7811AA65504002549A7 /* IASKAppSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsViewController.m; sourceTree = "<group>"; };
FF2EB7821AA65504002549A7 /* IASKAppSettingsWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsWebViewController.h; sourceTree = "<group>"; };
FF2EB7831AA65504002549A7 /* IASKAppSettingsWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsWebViewController.m; sourceTree = "<group>"; };
FF2EB7841AA65504002549A7 /* IASKMultipleValueSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKMultipleValueSelection.h; sourceTree = "<group>"; };
FF2EB7851AA65504002549A7 /* IASKMultipleValueSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKMultipleValueSelection.m; sourceTree = "<group>"; };
FF2EB7861AA65504002549A7 /* IASKSpecifierValuesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifierValuesViewController.h; sourceTree = "<group>"; };
FF2EB7871AA65504002549A7 /* IASKSpecifierValuesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifierValuesViewController.m; sourceTree = "<group>"; };
FF2EB7881AA65504002549A7 /* IASKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKViewController.h; sourceTree = "<group>"; };
FF2EB78A1AA65504002549A7 /* IASKSettingsReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsReader.h; sourceTree = "<group>"; };
FF2EB78B1AA65504002549A7 /* IASKSettingsReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsReader.m; sourceTree = "<group>"; };
FF2EB78C1AA65504002549A7 /* IASKSettingsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStore.h; sourceTree = "<group>"; };
FF2EB78D1AA65504002549A7 /* IASKSettingsStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStore.m; sourceTree = "<group>"; };
FF2EB78E1AA65504002549A7 /* IASKSettingsStoreFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreFile.h; sourceTree = "<group>"; };
FF2EB78F1AA65504002549A7 /* IASKSettingsStoreFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreFile.m; sourceTree = "<group>"; };
FF2EB7901AA65504002549A7 /* IASKSettingsStoreUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreUserDefaults.h; sourceTree = "<group>"; };
FF2EB7911AA65504002549A7 /* IASKSettingsStoreUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreUserDefaults.m; sourceTree = "<group>"; };
FF2EB7921AA65504002549A7 /* IASKSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifier.h; sourceTree = "<group>"; };
FF2EB7931AA65504002549A7 /* IASKSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifier.m; sourceTree = "<group>"; };
FF2EB7961AA65504002549A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7971AA65504002549A7 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7981AA65504002549A7 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7991AA65504002549A7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79A1AA65504002549A7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79B1AA65504002549A7 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79C1AA65504002549A7 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79D1AA65504002549A7 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79E1AA65504002549A7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB79F1AA65504002549A7 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/IASKLocalizable.strings"; sourceTree = "<group>"; };
FF2EB7A01AA65504002549A7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7A11AA65504002549A7 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7A21AA65504002549A7 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7A31AA65504002549A7 /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7A41AA65504002549A7 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF2EB7A61AA65504002549A7 /* IASKPSSliderSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSSliderSpecifierViewCell.h; sourceTree = "<group>"; };
FF2EB7A71AA65504002549A7 /* IASKPSSliderSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSSliderSpecifierViewCell.m; sourceTree = "<group>"; };
FF2EB7A81AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSTextFieldSpecifierViewCell.h; sourceTree = "<group>"; };
FF2EB7A91AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSTextFieldSpecifierViewCell.m; sourceTree = "<group>"; };
FF2EB7AA1AA65504002549A7 /* IASKSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSlider.h; sourceTree = "<group>"; };
FF2EB7AB1AA65504002549A7 /* IASKSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSlider.m; sourceTree = "<group>"; };
FF2EB7AC1AA65504002549A7 /* IASKSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSwitch.h; sourceTree = "<group>"; };
FF2EB7AD1AA65504002549A7 /* IASKSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSwitch.m; sourceTree = "<group>"; };
FF2EB7AE1AA65504002549A7 /* IASKTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextField.h; sourceTree = "<group>"; };
FF2EB7AF1AA65504002549A7 /* IASKTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextField.m; sourceTree = "<group>"; };
FF308A7A18C01014009F986A /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
FF308A7C18C01025009F986A /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
FF308A7E18C01037009F986A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
FF308A8018C01043009F986A /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
FF322234185BC1AA004078AA /* logo_58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo_58.png; sourceTree = "<group>"; };
FF322236185BC1CE004078AA /* logo_80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo_80.png; sourceTree = "<group>"; };
FF34FD2C1E9D93CB0062F8ED /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = "<group>"; };
FF34FD2D1E9D93CB0062F8ED /* IASKAppSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsViewController.m; sourceTree = "<group>"; };
FF34FD2E1E9D93CB0062F8ED /* IASKAppSettingsWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsWebViewController.h; sourceTree = "<group>"; };
FF34FD2F1E9D93CB0062F8ED /* IASKAppSettingsWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsWebViewController.m; sourceTree = "<group>"; };
FF34FD301E9D93CB0062F8ED /* IASKMultipleValueSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKMultipleValueSelection.h; sourceTree = "<group>"; };
FF34FD311E9D93CB0062F8ED /* IASKMultipleValueSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKMultipleValueSelection.m; sourceTree = "<group>"; };
FF34FD321E9D93CB0062F8ED /* IASKSpecifierValuesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifierValuesViewController.h; sourceTree = "<group>"; };
FF34FD331E9D93CB0062F8ED /* IASKSpecifierValuesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifierValuesViewController.m; sourceTree = "<group>"; };
FF34FD341E9D93CB0062F8ED /* IASKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKViewController.h; sourceTree = "<group>"; };
FF34FD361E9D93CB0062F8ED /* IASKSettingsReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsReader.h; sourceTree = "<group>"; };
FF34FD371E9D93CB0062F8ED /* IASKSettingsReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsReader.m; sourceTree = "<group>"; };
FF34FD381E9D93CB0062F8ED /* IASKSettingsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStore.h; sourceTree = "<group>"; };
FF34FD391E9D93CB0062F8ED /* IASKSettingsStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStore.m; sourceTree = "<group>"; };
FF34FD3A1E9D93CB0062F8ED /* IASKSettingsStoreFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreFile.h; sourceTree = "<group>"; };
FF34FD3B1E9D93CB0062F8ED /* IASKSettingsStoreFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreFile.m; sourceTree = "<group>"; };
FF34FD3C1E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreUserDefaults.h; sourceTree = "<group>"; };
FF34FD3D1E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreUserDefaults.m; sourceTree = "<group>"; };
FF34FD3E1E9D93CB0062F8ED /* IASKSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifier.h; sourceTree = "<group>"; };
FF34FD3F1E9D93CB0062F8ED /* IASKSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifier.m; sourceTree = "<group>"; };
FF34FD421E9D93CB0062F8ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD431E9D93CB0062F8ED /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD441E9D93CB0062F8ED /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD451E9D93CB0062F8ED /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD461E9D93CB0062F8ED /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD471E9D93CB0062F8ED /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD481E9D93CB0062F8ED /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD491E9D93CB0062F8ED /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD4A1E9D93CB0062F8ED /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD4B1E9D93CB0062F8ED /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/IASKLocalizable.strings"; sourceTree = "<group>"; };
FF34FD4C1E9D93CB0062F8ED /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD4D1E9D93CB0062F8ED /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD4E1E9D93CB0062F8ED /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD4F1E9D93CB0062F8ED /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD501E9D93CB0062F8ED /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/IASKLocalizable.strings; sourceTree = "<group>"; };
FF34FD521E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSSliderSpecifierViewCell.h; sourceTree = "<group>"; };
FF34FD531E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSSliderSpecifierViewCell.m; sourceTree = "<group>"; };
FF34FD541E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSTextFieldSpecifierViewCell.h; sourceTree = "<group>"; };
FF34FD551E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSTextFieldSpecifierViewCell.m; sourceTree = "<group>"; };
FF34FD561E9D93CB0062F8ED /* IASKSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSlider.h; sourceTree = "<group>"; };
FF34FD571E9D93CB0062F8ED /* IASKSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSlider.m; sourceTree = "<group>"; };
FF34FD581E9D93CB0062F8ED /* IASKSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSwitch.h; sourceTree = "<group>"; };
FF34FD591E9D93CB0062F8ED /* IASKSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSwitch.m; sourceTree = "<group>"; };
FF34FD5A1E9D93CB0062F8ED /* IASKTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextField.h; sourceTree = "<group>"; };
FF34FD5B1E9D93CB0062F8ED /* IASKTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextField.m; sourceTree = "<group>"; };
FF34FD5C1E9D93CB0062F8ED /* IASKTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextView.h; sourceTree = "<group>"; };
FF34FD5D1E9D93CB0062F8ED /* IASKTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextView.m; sourceTree = "<group>"; };
FF34FD5E1E9D93CB0062F8ED /* IASKTextViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextViewCell.h; sourceTree = "<group>"; };
FF34FD5F1E9D93CB0062F8ED /* IASKTextViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextViewCell.m; sourceTree = "<group>"; };
FF3964BB192BED0A004BEE1A /* tag.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tag.png; sourceTree = "<group>"; };
FF3A3DED1BFBBAC600ADC01A /* ChronicleSSm-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ChronicleSSm-Bold.otf"; sourceTree = "<group>"; };
FF3A3DEE1BFBBAC600ADC01A /* ChronicleSSm-BoldItalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ChronicleSSm-BoldItalic.otf"; sourceTree = "<group>"; };
@ -1468,10 +1474,10 @@
FF03AFE619F87F2E0063002A /* TUSafariActivity */,
FFA045AD19CA49D700618DC4 /* SloppySwiper */,
FFCDD8FB17F6368F000C6483 /* MCSwipeTableViewCell */,
FF2EB77E1AA65504002549A7 /* InAppSettingsKit */,
FF753CC2175858FC00344EC9 /* fmdb */,
FF22FE5316E53ADC0046165A /* Underscore */,
FF2924CE1E93293F00FCFA63 /* PINCache */,
FF34FD2A1E9D93CB0062F8ED /* InAppSettingsKit */,
43A4C3E615B0099B008787B5 /* NewsBlur_Prefix.pch */,
43A4C3B915B00966008787B5 /* ABTableViewCell.h */,
43A4C3BA15B00966008787B5 /* ABTableViewCell.m */,
@ -2188,72 +2194,76 @@
path = segmented;
sourceTree = "<group>";
};
FF2EB77E1AA65504002549A7 /* InAppSettingsKit */ = {
FF34FD2A1E9D93CB0062F8ED /* InAppSettingsKit */ = {
isa = PBXGroup;
children = (
FF2EB77F1AA65504002549A7 /* Controllers */,
FF2EB7891AA65504002549A7 /* Models */,
FF2EB7941AA65504002549A7 /* Resources */,
FF2EB7A51AA65504002549A7 /* Views */,
FF34FD2B1E9D93CB0062F8ED /* Controllers */,
FF34FD351E9D93CB0062F8ED /* Models */,
FF34FD401E9D93CB0062F8ED /* Resources */,
FF34FD511E9D93CB0062F8ED /* Views */,
);
name = InAppSettingsKit;
path = "Other Sources/InAppSettingsKit";
sourceTree = "<group>";
};
FF2EB77F1AA65504002549A7 /* Controllers */ = {
FF34FD2B1E9D93CB0062F8ED /* Controllers */ = {
isa = PBXGroup;
children = (
FF2EB7801AA65504002549A7 /* IASKAppSettingsViewController.h */,
FF2EB7811AA65504002549A7 /* IASKAppSettingsViewController.m */,
FF2EB7821AA65504002549A7 /* IASKAppSettingsWebViewController.h */,
FF2EB7831AA65504002549A7 /* IASKAppSettingsWebViewController.m */,
FF2EB7841AA65504002549A7 /* IASKMultipleValueSelection.h */,
FF2EB7851AA65504002549A7 /* IASKMultipleValueSelection.m */,
FF2EB7861AA65504002549A7 /* IASKSpecifierValuesViewController.h */,
FF2EB7871AA65504002549A7 /* IASKSpecifierValuesViewController.m */,
FF2EB7881AA65504002549A7 /* IASKViewController.h */,
FF34FD2C1E9D93CB0062F8ED /* IASKAppSettingsViewController.h */,
FF34FD2D1E9D93CB0062F8ED /* IASKAppSettingsViewController.m */,
FF34FD2E1E9D93CB0062F8ED /* IASKAppSettingsWebViewController.h */,
FF34FD2F1E9D93CB0062F8ED /* IASKAppSettingsWebViewController.m */,
FF34FD301E9D93CB0062F8ED /* IASKMultipleValueSelection.h */,
FF34FD311E9D93CB0062F8ED /* IASKMultipleValueSelection.m */,
FF34FD321E9D93CB0062F8ED /* IASKSpecifierValuesViewController.h */,
FF34FD331E9D93CB0062F8ED /* IASKSpecifierValuesViewController.m */,
FF34FD341E9D93CB0062F8ED /* IASKViewController.h */,
);
path = Controllers;
sourceTree = "<group>";
};
FF2EB7891AA65504002549A7 /* Models */ = {
FF34FD351E9D93CB0062F8ED /* Models */ = {
isa = PBXGroup;
children = (
FF2EB78A1AA65504002549A7 /* IASKSettingsReader.h */,
FF2EB78B1AA65504002549A7 /* IASKSettingsReader.m */,
FF2EB78C1AA65504002549A7 /* IASKSettingsStore.h */,
FF2EB78D1AA65504002549A7 /* IASKSettingsStore.m */,
FF2EB78E1AA65504002549A7 /* IASKSettingsStoreFile.h */,
FF2EB78F1AA65504002549A7 /* IASKSettingsStoreFile.m */,
FF2EB7901AA65504002549A7 /* IASKSettingsStoreUserDefaults.h */,
FF2EB7911AA65504002549A7 /* IASKSettingsStoreUserDefaults.m */,
FF2EB7921AA65504002549A7 /* IASKSpecifier.h */,
FF2EB7931AA65504002549A7 /* IASKSpecifier.m */,
FF34FD361E9D93CB0062F8ED /* IASKSettingsReader.h */,
FF34FD371E9D93CB0062F8ED /* IASKSettingsReader.m */,
FF34FD381E9D93CB0062F8ED /* IASKSettingsStore.h */,
FF34FD391E9D93CB0062F8ED /* IASKSettingsStore.m */,
FF34FD3A1E9D93CB0062F8ED /* IASKSettingsStoreFile.h */,
FF34FD3B1E9D93CB0062F8ED /* IASKSettingsStoreFile.m */,
FF34FD3C1E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.h */,
FF34FD3D1E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.m */,
FF34FD3E1E9D93CB0062F8ED /* IASKSpecifier.h */,
FF34FD3F1E9D93CB0062F8ED /* IASKSpecifier.m */,
);
path = Models;
sourceTree = "<group>";
};
FF2EB7941AA65504002549A7 /* Resources */ = {
FF34FD401E9D93CB0062F8ED /* Resources */ = {
isa = PBXGroup;
children = (
FF2EB7951AA65504002549A7 /* IASKLocalizable.strings */,
FF34FD411E9D93CB0062F8ED /* IASKLocalizable.strings */,
);
path = Resources;
sourceTree = "<group>";
};
FF2EB7A51AA65504002549A7 /* Views */ = {
FF34FD511E9D93CB0062F8ED /* Views */ = {
isa = PBXGroup;
children = (
FF2EB7A61AA65504002549A7 /* IASKPSSliderSpecifierViewCell.h */,
FF2EB7A71AA65504002549A7 /* IASKPSSliderSpecifierViewCell.m */,
FF2EB7A81AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.h */,
FF2EB7A91AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.m */,
FF2EB7AA1AA65504002549A7 /* IASKSlider.h */,
FF2EB7AB1AA65504002549A7 /* IASKSlider.m */,
FF2EB7AC1AA65504002549A7 /* IASKSwitch.h */,
FF2EB7AD1AA65504002549A7 /* IASKSwitch.m */,
FF2EB7AE1AA65504002549A7 /* IASKTextField.h */,
FF2EB7AF1AA65504002549A7 /* IASKTextField.m */,
FF34FD521E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.h */,
FF34FD531E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.m */,
FF34FD541E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.h */,
FF34FD551E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.m */,
FF34FD561E9D93CB0062F8ED /* IASKSlider.h */,
FF34FD571E9D93CB0062F8ED /* IASKSlider.m */,
FF34FD581E9D93CB0062F8ED /* IASKSwitch.h */,
FF34FD591E9D93CB0062F8ED /* IASKSwitch.m */,
FF34FD5A1E9D93CB0062F8ED /* IASKTextField.h */,
FF34FD5B1E9D93CB0062F8ED /* IASKTextField.m */,
FF34FD5C1E9D93CB0062F8ED /* IASKTextView.h */,
FF34FD5D1E9D93CB0062F8ED /* IASKTextView.m */,
FF34FD5E1E9D93CB0062F8ED /* IASKTextViewCell.h */,
FF34FD5F1E9D93CB0062F8ED /* IASKTextViewCell.m */,
);
path = Views;
sourceTree = "<group>";
@ -2731,7 +2741,6 @@
FF41309D162CEC7100DDB6A7 /* time.png in Resources */,
FF4130A0162CECAE00DDB6A7 /* email.png in Resources */,
FF6A23391644957800E15989 /* StoryPageControl.xib in Resources */,
FF2EB7B91AA65504002549A7 /* IASKLocalizable.strings in Resources */,
FF67D3B7168977690057A7DA /* TrainerViewController.xib in Resources */,
FF67D3BB168A70630057A7DA /* trainer.css in Resources */,
FF3FA8951BB26B6A001F7C32 /* copy_link@2x.png in Resources */,
@ -2807,6 +2816,7 @@
17CBD3C21BF6ED2C003FCCAE /* menu_icn_markread.png in Resources */,
FFB7050E1925921F0052101C /* line_spacing_xs.png in Resources */,
FF22FE4E16E41EB40046165A /* disclosure_down.png in Resources */,
FF34FD691E9D93CB0062F8ED /* IASKLocalizable.strings in Resources */,
FF21B1111C821E150053938A /* disclosure_border_dark@2x.png in Resources */,
176129611C630AEB00702FE4 /* mute_feed_off@2x.png in Resources */,
17BE5A741C5DDA8C0075F92C /* barbutton_sort_asc@3x.png in Resources */,
@ -2959,46 +2969,44 @@
FF0FAEB117B084D2008651F9 /* OfflineCleanImages.m in Sources */,
43F44B1C159D8DBC00F48F8A /* FeedTableCell.m in Sources */,
1D3623260D0F684500981E51 /* NewsBlurAppDelegate.m in Sources */,
FF2EB7B81AA65504002549A7 /* IASKSpecifier.m in Sources */,
17432C861C5343C0003F8FD6 /* FeedChooserTitleView.m in Sources */,
28D7ACF80DDB3853001CB0EB /* NewsBlurViewController.m in Sources */,
FFFF683D19D628000081904A /* NBURLCache.m in Sources */,
FF2EB7B61AA65504002549A7 /* IASKSettingsStoreFile.m in Sources */,
787A0CDB11CE65330056422D /* FeedDetailViewController.m in Sources */,
FF2EB7B51AA65504002549A7 /* IASKSettingsStore.m in Sources */,
7842ECF811D44A530066CF9D /* StoryDetailViewController.m in Sources */,
FF2924E61E932D2900FCFA63 /* PINDiskCache.m in Sources */,
7843F50511EEB1A000675F64 /* FeedDetailTableCell.m in Sources */,
784B50ED127E3F68008F90EA /* LoginViewController.m in Sources */,
FF5ACC241DE5F0C000FBD044 /* NotificationsViewController.m in Sources */,
FF2EB7B41AA65504002549A7 /* IASKSettingsReader.m in Sources */,
FFCDD8FE17F6368F000C6483 /* MCSwipeTableViewCell.m in Sources */,
78095EC9128F30B500230C8E /* OriginalStoryViewController.m in Sources */,
FF1C4E171A3FB1F4000995E3 /* NBActivityItemSource.m in Sources */,
17C4954B1C129863004805A7 /* UISearchBar+Field.m in Sources */,
FF3A3E171BFC3F1300ADC01A /* NSNull+JSON.m in Sources */,
FF34FD6C1E9D93CB0062F8ED /* IASKSlider.m in Sources */,
FF5EA47F143B691000B7563D /* AddSiteViewController.m in Sources */,
FF1F13D818AAC97900FDA816 /* UIImage+Resize.m in Sources */,
FFD887F01445F1E800385399 /* AddSiteAutocompleteCell.m in Sources */,
FF8D1ECD1BAA311000725D8A /* SBJson4StreamParser.m in Sources */,
FFE5322F144C8AC300ACFDE0 /* Utilities.m in Sources */,
FFD1D7311459B63500E46F89 /* BaseViewController.m in Sources */,
FF34FD6D1E9D93CB0062F8ED /* IASKSwitch.m in Sources */,
FF9B8BB217F2351A0036A41C /* NBBarButtonItem.m in Sources */,
FF2D8CE514893BC000057B80 /* MoveSiteViewController.m in Sources */,
433323CD158968ED0025064D /* FirstTimeUserViewController.m in Sources */,
FF2924C41E92DF7C00FCFA63 /* AFSecurityPolicy.m in Sources */,
FF34FD6B1E9D93CB0062F8ED /* IASKPSTextFieldSpecifierViewCell.m in Sources */,
FF8D1ED01BAA311000725D8A /* SBJson4StreamWriter.m in Sources */,
43763AD1158F90B100B3DBE2 /* FontSettingsViewController.m in Sources */,
FF34FD601E9D93CB0062F8ED /* IASKAppSettingsViewController.m in Sources */,
439DAB201590DA350019B0EB /* FeedsMenuViewController.m in Sources */,
17CBD3BF1BF66B6C003FCCAE /* MarkReadMenuViewController.m in Sources */,
FFA045B519CA49D700618DC4 /* SSWAnimator.m in Sources */,
437AA8CA159394E2005463F5 /* ShareViewController.m in Sources */,
FF8D1ECC1BAA311000725D8A /* SBJson4Parser.m in Sources */,
FF2EB7B01AA65504002549A7 /* IASKAppSettingsViewController.m in Sources */,
431B856815A0C45200DCE497 /* FriendsListViewController.m in Sources */,
431B856E15A0D91E00DCE497 /* UserProfileViewController.m in Sources */,
FF8D1EDB1BAA3CCD00725D8A /* JNWThrottledBlock.m in Sources */,
FF2EB7B31AA65504002549A7 /* IASKSpecifierValuesViewController.m in Sources */,
431B858115A23C6B00DCE497 /* ProfileBadge.m in Sources */,
437F974C15ACA0ED0007136B /* DashboardViewController.m in Sources */,
FF2924C71E92DF7C00FCFA63 /* AFURLSessionManager.m in Sources */,
@ -3012,18 +3020,20 @@
43A4C3DD15B00966008787B5 /* MBProgressHUD.m in Sources */,
FF2924CA1E92DF7C00FCFA63 /* UIImageView+AFNetworking.m in Sources */,
43A4C3E115B00966008787B5 /* NSString+HTML.m in Sources */,
FF34FD641E9D93CB0062F8ED /* IASKSettingsReader.m in Sources */,
FF6282151A11613900271FDB /* UserTagsViewController.m in Sources */,
FF2EB7BD1AA65504002549A7 /* IASKSwitch.m in Sources */,
43A4C3E315B00966008787B5 /* StringHelper.m in Sources */,
FF2924C91E92DF7C00FCFA63 /* UIButton+AFNetworking.m in Sources */,
43A4C3E415B00966008787B5 /* TransparentToolbar.m in Sources */,
FFD6604C1BACA45D006E4B8D /* THCircularProgressView.m in Sources */,
FF34FD681E9D93CB0062F8ED /* IASKSpecifier.m in Sources */,
FF2924C61E92DF7C00FCFA63 /* AFURLResponseSerialization.m in Sources */,
FFA0484419CA73B700618DC4 /* UIView+ViewController.m in Sources */,
FF2924E51E932D2900FCFA63 /* PINCache.m in Sources */,
17432C891C534BC6003F8FD6 /* FeedChooserViewCell.m in Sources */,
43A4C3E515B00966008787B5 /* UIView+TKCategory.m in Sources */,
FF2924C11E92DF7C00FCFA63 /* AFImageDownloader.m in Sources */,
FF34FD631E9D93CB0062F8ED /* IASKSpecifierValuesViewController.m in Sources */,
FF2924C31E92DF7C00FCFA63 /* AFNetworkReachabilityManager.m in Sources */,
43F6A79D15B0CDC60092EE91 /* ActivityCell.m in Sources */,
FF3FA88D1BB2677C001F7C32 /* NBCopyLinkActivity.m in Sources */,
@ -3031,30 +3041,27 @@
FF03B00919F987E00063002A /* NJKWebViewProgress.m in Sources */,
010EDEFA1B2386B7003B79DE /* OnePasswordExtension.m in Sources */,
43ABBCAA15B53A1400EA3111 /* InteractionCell.m in Sources */,
FF2EB7BE1AA65504002549A7 /* IASKTextField.m in Sources */,
FF34FD611E9D93CB0062F8ED /* IASKAppSettingsWebViewController.m in Sources */,
FF8D1ECF1BAA311000725D8A /* SBJson4StreamTokeniser.m in Sources */,
FF5ACC2E1DE63C6D00FBD044 /* MultiSelectSegmentedControl.m in Sources */,
FF8D1ED81BAA33BA00725D8A /* NSObject+SBJSON.m in Sources */,
FF2EB7B11AA65504002549A7 /* IASKAppSettingsWebViewController.m in Sources */,
FF2EB7BB1AA65504002549A7 /* IASKPSTextFieldSpecifierViewCell.m in Sources */,
FF34FD651E9D93CB0062F8ED /* IASKSettingsStore.m in Sources */,
43D818A315B940C200733444 /* DataUtilities.m in Sources */,
FF03AFFD19F881380063002A /* ARChromeActivity.m in Sources */,
4383DCD615BB8B88007E6611 /* SmallActivityCell.m in Sources */,
43E8381E15BC73EB000553BE /* FirstTimeUserAddFriendsViewController.m in Sources */,
FF34FD661E9D93CB0062F8ED /* IASKSettingsStoreFile.m in Sources */,
43E8382015BC73EB000553BE /* FirstTimeUserAddNewsBlurViewController.m in Sources */,
43E8382215BC73EB000553BE /* FirstTimeUserAddSitesViewController.m in Sources */,
436ACA8D15BF1088004E01CC /* NBContainerViewController.m in Sources */,
FFA0483E19CA5B8400618DC4 /* EventWindow.m in Sources */,
432EBD2315D1D4070000729D /* AddSiteTableCell.m in Sources */,
FF2EB7BC1AA65504002549A7 /* IASKSlider.m in Sources */,
438FEDE815D5B15F00E3B3C9 /* FollowGrid.m in Sources */,
FF8D1ED21BAA311000725D8A /* SBJson4Writer.m in Sources */,
43B232C015D5F61700D035B4 /* AuthorizeServicesViewController.m in Sources */,
FF2924E71E932D2900FCFA63 /* PINMemoryCache.m in Sources */,
FF2924BF1E92DF7C00FCFA63 /* AFAutoPurgingImageCache.m in Sources */,
FF2924C21E92DF7C00FCFA63 /* AFNetworkActivityIndicatorManager.m in Sources */,
FF2EB7B71AA65504002549A7 /* IASKSettingsStoreUserDefaults.m in Sources */,
FF2EB7BA1AA65504002549A7 /* IASKPSSliderSpecifierViewCell.m in Sources */,
43CE0F5F15DADB7F00608ED8 /* SiteCell.m in Sources */,
FFA045B419CA49D700618DC4 /* SloppySwiper.m in Sources */,
E160F0571C9DAC2C00CB96DF /* UIViewController+HidePopover.m in Sources */,
@ -3062,12 +3069,14 @@
FFDE35DA161D12250034BFDE /* UnreadCountView.m in Sources */,
FFDE35EA162799B90034BFDE /* FeedDetailMenuViewController.m in Sources */,
FF2924C01E92DF7C00FCFA63 /* AFHTTPSessionManager.m in Sources */,
FF34FD621E9D93CB0062F8ED /* IASKMultipleValueSelection.m in Sources */,
FF4130A3162E10CF00DDB6A7 /* MenuTableViewCell.m in Sources */,
17432C7F1C533FBC003F8FD6 /* MenuViewController.m in Sources */,
17E635AF1C548C580075338E /* FeedChooserItem.m in Sources */,
FF6A233216448E0700E15989 /* StoryPageControl.m in Sources */,
FF67D3B2168924C40057A7DA /* TrainerViewController.m in Sources */,
FF1660CD16D6FD8A00AF8541 /* SmallInteractionCell.m in Sources */,
FF34FD6E1E9D93CB0062F8ED /* IASKTextField.m in Sources */,
FF8D1ECE1BAA311000725D8A /* SBJson4StreamParserState.m in Sources */,
FF2924CB1E92DF7C00FCFA63 /* UIProgressView+AFNetworking.m in Sources */,
FF4151C016DED9660013E84B /* UIBarButtonItem+Image.m in Sources */,
@ -3091,16 +3100,19 @@
FF6618C8176184560039913B /* NBNotifier.m in Sources */,
FF03AFF319F87F2E0063002A /* TUSafariActivity.m in Sources */,
FF03B00A19F987E00063002A /* NJKWebViewProgressView.m in Sources */,
FF2EB7B21AA65504002549A7 /* IASKMultipleValueSelection.m in Sources */,
FF11045F176950F900502C29 /* NBLoadingCell.m in Sources */,
FFA0484119CA5F5B00618DC4 /* UIWebView+Offsets.m in Sources */,
FF34FD701E9D93CB0062F8ED /* IASKTextViewCell.m in Sources */,
FFAD89C218AC45A100D68567 /* StoriesCollection.m in Sources */,
FF34FD6F1E9D93CB0062F8ED /* IASKTextView.m in Sources */,
FF855B5B1794B0670098D48A /* OfflineSyncUnreads.m in Sources */,
FF34FD6A1E9D93CB0062F8ED /* IASKPSSliderSpecifierViewCell.m in Sources */,
FF855B5E1794B0760098D48A /* OfflineFetchStories.m in Sources */,
FF855B611794B0830098D48A /* OfflineFetchImages.m in Sources */,
FF2924C51E92DF7C00FCFA63 /* AFURLRequestSerialization.m in Sources */,
FF8D1EA71BAA304E00725D8A /* Reachability.m in Sources */,
FFCDD90117F65A71000C6483 /* NBSwipeableCell.m in Sources */,
FF34FD671E9D93CB0062F8ED /* IASKSettingsStoreUserDefaults.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -3123,24 +3135,24 @@
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
FF2EB7951AA65504002549A7 /* IASKLocalizable.strings */ = {
FF34FD411E9D93CB0062F8ED /* IASKLocalizable.strings */ = {
isa = PBXVariantGroup;
children = (
FF2EB7961AA65504002549A7 /* Base */,
FF2EB7971AA65504002549A7 /* de */,
FF2EB7981AA65504002549A7 /* el */,
FF2EB7991AA65504002549A7 /* en */,
FF2EB79A1AA65504002549A7 /* es */,
FF2EB79B1AA65504002549A7 /* fr */,
FF2EB79C1AA65504002549A7 /* it */,
FF2EB79D1AA65504002549A7 /* ja */,
FF2EB79E1AA65504002549A7 /* nl */,
FF2EB79F1AA65504002549A7 /* pt-PT */,
FF2EB7A01AA65504002549A7 /* pt */,
FF2EB7A11AA65504002549A7 /* ru */,
FF2EB7A21AA65504002549A7 /* sv */,
FF2EB7A31AA65504002549A7 /* th */,
FF2EB7A41AA65504002549A7 /* tr */,
FF34FD421E9D93CB0062F8ED /* Base */,
FF34FD431E9D93CB0062F8ED /* de */,
FF34FD441E9D93CB0062F8ED /* el */,
FF34FD451E9D93CB0062F8ED /* en */,
FF34FD461E9D93CB0062F8ED /* es */,
FF34FD471E9D93CB0062F8ED /* fr */,
FF34FD481E9D93CB0062F8ED /* it */,
FF34FD491E9D93CB0062F8ED /* ja */,
FF34FD4A1E9D93CB0062F8ED /* nl */,
FF34FD4B1E9D93CB0062F8ED /* pt-PT */,
FF34FD4C1E9D93CB0062F8ED /* pt */,
FF34FD4D1E9D93CB0062F8ED /* ru */,
FF34FD4E1E9D93CB0062F8ED /* sv */,
FF34FD4F1E9D93CB0062F8ED /* th */,
FF34FD501E9D93CB0062F8ED /* tr */,
);
name = IASKLocalizable.strings;
sourceTree = "<group>";

View file

@ -15,15 +15,15 @@
@interface ARChromeActivity : UIActivity
// Empty by default. Either set this in the initializer, or set this property.
@property (strong, nonatomic) NSURL *callbackURL;
// Uses the "CFBundleName" from your Info.plist by default.
/// Uses the "CFBundleName" from your Info.plist by default.
@property (strong, nonatomic) NSString *callbackSource;
// The text beneath the icon. Defaults to "Chrome".
/// The text beneath the icon. Defaults to "Chrome".
@property (strong, nonatomic) NSString *activityTitle;
/// Empty by default. Either set this in the initializer, or set this property. For iOS 9+, make sure you register the Chrome URL scheme in your Info.plist. See the demo project.
@property (strong, nonatomic) NSURL *callbackURL;
- (id)initWithCallbackURL:(NSURL *)callbackURL;
@end

View file

@ -22,7 +22,8 @@
@synthesize activityTitle = _activityTitle;
static NSString *encodeByAddingPercentEscapes(NSString *input) {
NSString *encodedValue = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)input, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8));
NSString *encodedValue = [input stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
return encodedValue;
}
@ -49,7 +50,11 @@ static NSString *encodeByAddingPercentEscapes(NSString *input) {
}
- (UIImage *)activityImage {
return [UIImage imageNamed:@"ARChromeActivity"];
if ([[UIImage class] respondsToSelector:@selector(imageNamed:inBundle:compatibleWithTraitCollection:)]) {
return [UIImage imageNamed:@"ARChromeActivity" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
} else {
return [UIImage imageNamed:@"ARChromeActivity"];
}
}
- (NSString *)activityType {
@ -57,24 +62,31 @@ static NSString *encodeByAddingPercentEscapes(NSString *input) {
}
- (BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"googlechrome-x-callback://"]]) {
return NO;
}
for (id item in activityItems){
if ([item isKindOfClass:NSURL.class]){
return YES;
}
}
return NO;
if (_callbackURL && ![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"googlechrome-x-callback://"]]) {
return NO;
}
for (id item in activityItems){
if ([item isKindOfClass:NSURL.class]){
NSURL *url = (NSURL *)item;
if ([url.scheme isEqualToString:@"http"] || [url.scheme isEqualToString:@"https"]) {
return YES;
}
}
}
return NO;
}
- (void)prepareWithActivityItems:(NSArray *)activityItems {
for (id item in activityItems) {
if ([item isKindOfClass:NSURL.class]) {
_activityURL = (NSURL *)item;
return;
}
}
for (id item in activityItems) {
if ([item isKindOfClass:NSURL.class]) {
NSURL *url = (NSURL *)item;
if ([url.scheme isEqualToString:@"http"] || [url.scheme isEqualToString:@"https"]) {
_activityURL = (NSURL *)item;
return;
}
}
}
}
- (void)performActivity {

View file

@ -28,8 +28,6 @@
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender;
@optional
- (void)settingsViewControllerWillAppear:(IASKAppSettingsViewController*)sender;
#pragma mark - UITableView header customization
- (CGFloat) settingsViewController:(id<IASKViewController>)settingsViewController
tableView:(UITableView *)tableView

View file

@ -25,6 +25,7 @@
#import "IASKSpecifier.h"
#import "IASKSpecifierValuesViewController.h"
#import "IASKTextField.h"
#import "IASKTextViewCell.h"
#import "IASKMultipleValueSelection.h"
#if !__has_feature(objc_arc)
@ -40,7 +41,7 @@ static NSString *kIASKCredits = @"Powered by InAppSettingsKit"; // Leave this as
CGRect IASKCGRectSwap(CGRect rect);
@interface IASKAppSettingsViewController () {
@interface IASKAppSettingsViewController () <UITextViewDelegate> {
IASKSettingsReader *_settingsReader;
id<IASKSettingsStore> _settingsStore;
@ -52,6 +53,7 @@ CGRect IASKCGRectSwap(CGRect rect);
}
@property (nonatomic, strong) id currentFirstResponder;
@property (nonatomic, strong) NSMutableDictionary *rowHeights;
- (void)_textChanged:(id)sender;
- (void)synchronizeSettings;
@ -105,11 +107,10 @@ CGRect IASKCGRectSwap(CGRect rect);
for (int i = 0; i < _settingsReader.numberOfSections; i++) {
IASKSpecifier *specifier = [self.settingsReader headerSpecifierForSection:i];
if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {
IASKMultipleValueSelection *selection = [IASKMultipleValueSelection new];
IASKMultipleValueSelection *selection = [[IASKMultipleValueSelection alloc] initWithSettingsStore:self.settingsStore];
selection.tableView = self.tableView;
selection.specifier = specifier;
selection.section = i;
selection.settingsStore = self.settingsStore;
[sectionSelection addObject:selection];
} else {
[sectionSelection addObject:[NSNull null]];
@ -166,6 +167,7 @@ CGRect IASKCGRectSwap(CGRect rect);
_reloadDisabled = NO;
_showDoneButton = YES;
_showCreditsFooter = YES; // display credits for InAppSettingsKit creators
self.rowHeights = [NSMutableDictionary dictionary];
}
- (void)viewDidLoad {
@ -182,14 +184,20 @@ CGRect IASKCGRectSwap(CGRect rect);
}
- (void)viewWillAppear:(BOOL)animated {
NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
[super viewWillAppear:animated];
// if there's something selected, the value might have changed
// so reload that row
NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
if(selectedIndexPath) {
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:selectedIndexPath]
withRowAnimation:UITableViewRowAnimationNone];
// and reselect it, so we get the nice default deselect animation from UITableViewController
[self.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(animated * UINavigationControllerHideShowBarDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:selectedIndexPath]
withRowAnimation:UITableViewRowAnimationNone];
// and reselect it, so we get the nice default deselect animation from UITableViewController
[self.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[self.tableView deselectRowAtIndexPath:selectedIndexPath animated:YES];
});
}
if (_showDoneButton) {
@ -209,15 +217,9 @@ CGRect IASKCGRectSwap(CGRect rect);
[dc addObserver:self selector:@selector(didChangeSettingViaIASK:) name:kIASKAppSettingChanged object:nil];
[self userDefaultsDidChange]; // force update in case of changes while we were hidden
}
if (self.delegate && [self.delegate conformsToProtocol:@protocol(IASKSettingsDelegate)]) {
[self.delegate settingsViewControllerWillAppear:self];
}
[super viewWillAppear:animated];
}
- (CGSize)contentSizeForViewInPopover {
- (CGSize)preferredContentSize {
return [[self view] sizeThatFits:CGSizeMake(320, 2000)];
}
@ -395,7 +397,7 @@ CGRect IASKCGRectSwap(CGRect rect);
}
}
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged
object:[toggle key]
object:self
userInfo:[NSDictionary dictionaryWithObject:[self.settingsStore objectForKey:[toggle key]]
forKey:[toggle key]]];
}
@ -404,7 +406,7 @@ CGRect IASKCGRectSwap(CGRect rect);
IASKSlider *slider = (IASKSlider*)sender;
[self.settingsStore setFloat:[slider value] forKey:[slider key]];
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged
object:[slider key]
object:self
userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:[slider value]]
forKey:[slider key]]];
}
@ -423,7 +425,10 @@ CGRect IASKCGRectSwap(CGRect rect);
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
IASKSpecifier *specifier = [self.settingsReader specifierForIndexPath:indexPath];
if ([[specifier type] isEqualToString:kIASKCustomViewSpecifier]) {
if ([specifier.type isEqualToString:kIASKTextViewSpecifier]) {
CGFloat height = (CGFloat)[self.rowHeights[specifier.key] doubleValue];
return height > 0 ? height : UITableViewAutomaticDimension;
} else if ([[specifier type] isEqualToString:kIASKCustomViewSpecifier]) {
if ([self.delegate respondsToSelector:@selector(tableView:heightForSpecifier:)]) {
return [self.delegate tableView:tableView heightForSpecifier:specifier];
} else {
@ -437,7 +442,8 @@ CGRect IASKCGRectSwap(CGRect rect);
UIContentSizeCategoryMedium: @(44),
UIContentSizeCategoryLarge: @(44),
UIContentSizeCategoryExtraLarge: @(47)};
return (CGFloat)[rowHeights[UIApplication.sharedApplication.preferredContentSizeCategory] doubleValue] ? : 51;
CGFloat rowHeight = (CGFloat)[rowHeights[UIApplication.sharedApplication.preferredContentSizeCategory] doubleValue];
return rowHeight != 0 ? rowHeight : 51;
);
return 44;
}
@ -509,6 +515,9 @@ CGRect IASKCGRectSwap(CGRect rect);
cell = [[IASKPSTextFieldSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKPSTextFieldSpecifier];
[((IASKPSTextFieldSpecifierViewCell*)cell).textField addTarget:self action:@selector(_textChanged:) forControlEvents:UIControlEventEditingChanged];
}
else if ([identifier hasPrefix:kIASKTextViewSpecifier]) {
cell = [[IASKTextViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKTextViewSpecifier];
}
else if ([identifier hasPrefix:kIASKPSSliderSpecifier]) {
cell = [[IASKPSSliderSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKPSSliderSpecifier];
} else if ([identifier hasPrefix:kIASKPSChildPaneSpecifier]) {
@ -590,6 +599,7 @@ CGRect IASKCGRectSwap(CGRect rect);
}
IASKTextField *textField = ((IASKPSTextFieldSpecifierViewCell*)cell).textField;
textField.text = textValue;
textField.placeholder = specifier.placeholder;
textField.key = specifier.key;
textField.delegate = self;
textField.secureTextEntry = [specifier isSecure];
@ -603,6 +613,19 @@ CGRect IASKCGRectSwap(CGRect rect);
textField.textAlignment = specifier.textAlignment;
textField.adjustsFontSizeToFitWidth = specifier.adjustsFontSizeToFitWidth;
}
else if ([specifier.type isEqualToString:kIASKTextViewSpecifier]) {
IASKTextViewCell *textCell = (id)cell;
NSString *value = [self.settingsStore objectForKey:specifier.key] != nil ? [self.settingsStore objectForKey:specifier.key] : specifier.defaultStringValue;
textCell.textView.text = value;
textCell.textView.delegate = self;
textCell.textView.key = specifier.key;
textCell.textView.keyboardType = specifier.keyboardType;
textCell.textView.autocapitalizationType = specifier.autocapitalizationType;
textCell.textView.autocorrectionType = specifier.autoCorrectionType;
dispatch_async(dispatch_get_main_queue(), ^{
[self cacheRowHeightForTextView:textCell.textView];
});
}
else if ([specifier.type isEqualToString:kIASKPSSliderSpecifier]) {
if (specifier.minimumValueImage.length > 0) {
((IASKPSSliderSpecifierViewCell*)cell).minImage.image = [UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:specifier.minimumValueImage]];
@ -629,7 +652,7 @@ CGRect IASKCGRectSwap(CGRect rect);
cell.accessoryType = (specifier.textAlignment == NSTextAlignmentLeft) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
} else if ([specifier.type isEqualToString:kIASKButtonSpecifier]) {
NSString *value = [self.settingsStore objectForKey:specifier.key];
cell.textLabel.text = [value isKindOfClass:[NSString class]] ? [self.settingsReader titleForStringId:value] : specifier.title;
cell.textLabel.text = ([value isKindOfClass:NSString.class] && [self.settingsReader titleForId:value].length) ? [self.settingsReader titleForId:value] : specifier.title;
cell.detailTextLabel.text = specifier.subtitle;
IASK_IF_IOS7_OR_GREATER
(if (specifier.textAlignment != NSTextAlignmentLeft) {
@ -639,7 +662,7 @@ CGRect IASKCGRectSwap(CGRect rect);
cell.accessoryType = (specifier.textAlignment == NSTextAlignmentLeft) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
} else if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {
NSInteger index = [specifier.multipleValues indexOfObject:specifier.radioGroupValue];
cell.textLabel.text = [self.settingsReader titleForStringId:specifier.multipleTitles[index]];
cell.textLabel.text = [self.settingsReader titleForId:specifier.multipleTitles[index]];
[_selections[indexPath.section] updateSelectionInCell:cell indexPath:indexPath];
} else {
cell.textLabel.text = specifier.title;
@ -648,7 +671,7 @@ CGRect IASKCGRectSwap(CGRect rect);
cell.imageView.image = specifier.cellImage;
cell.imageView.highlightedImage = specifier.highlightedCellImage;
if (![specifier.type isEqualToString:kIASKPSMultiValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTitleValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTextFieldSpecifier]) {
if (![specifier.type isEqualToString:kIASKPSMultiValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTitleValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTextFieldSpecifier] && ![specifier.type isEqualToString:kIASKTextViewSpecifier]) {
cell.textLabel.textAlignment = specifier.textAlignment;
}
cell.detailTextLabel.textAlignment = specifier.textAlignment;
@ -690,9 +713,8 @@ CGRect IASKCGRectSwap(CGRect rect);
} else if ([[specifier type] isEqualToString:kIASKPSTextFieldSpecifier]) {
IASKPSTextFieldSpecifierViewCell *textFieldCell = (id)[tableView cellForRowAtIndexPath:indexPath];
[textFieldCell.textField becomeFirstResponder];
} else if ([[specifier type] isEqualToString:kIASKPSChildPaneSpecifier]) {
[textFieldCell.textField becomeFirstResponder];
} else if ([[specifier type] isEqualToString:kIASKPSChildPaneSpecifier]) {
if ([specifier viewControllerStoryBoardID]){
NSString *storyBoardFileFromSpecifier = [specifier viewControllerStoryBoardFile];
storyBoardFileFromSpecifier = storyBoardFileFromSpecifier && storyBoardFileFromSpecifier.length > 0 ? storyBoardFileFromSpecifier : [[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"];
@ -705,6 +727,11 @@ CGRect IASKCGRectSwap(CGRect rect);
Class vcClass = [specifier viewControllerClass];
if (vcClass) {
if (vcClass == [NSNull class]) {
NSLog(@"class '%@' not found", [specifier localizedObjectForKey:kIASKViewControllerClass]);
[tableView deselectRowAtIndexPath:indexPath animated:YES];
return;
}
SEL initSelector = [specifier viewControllerSelector];
if (!initSelector) {
initSelector = @selector(init);
@ -723,6 +750,17 @@ CGRect IASKCGRectSwap(CGRect rect);
IASK_IF_IOS7_OR_GREATER(vc.view.tintColor = self.view.tintColor;)
[self.navigationController pushViewController:vc animated:YES];
return;
}
NSString *segueIdentifier = [specifier segueIdentifier];
if (segueIdentifier) {
@try {
[self performSegueWithIdentifier:segueIdentifier sender:self];
} @catch (NSException *exception) {
NSLog(@"segue with identifier '%@' not defined", segueIdentifier);
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
return;
}
if (nil == [specifier file]) {
@ -749,7 +787,7 @@ CGRect IASKCGRectSwap(CGRect rect);
} else if ([[specifier type] isEqualToString:kIASKOpenURLSpecifier]) {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[specifier localizedObjectForKey:kIASKFile]] options:@{} completionHandler:nil];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[specifier localizedObjectForKey:kIASKFile]] options:@{} completionHandler:nil];
} else if ([[specifier type] isEqualToString:kIASKButtonSpecifier]) {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if ([self.delegate respondsToSelector:@selector(settingsViewController:buttonTappedForSpecifier:)]) {
@ -827,6 +865,8 @@ CGRect IASKCGRectSwap(CGRect rect);
}];
} else {
IASK_IF_PRE_IOS8
(
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:NSLocalizedString(@"Mail not configured", @"InAppSettingsKit")
message:NSLocalizedString(@"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.", @"InAppSettingsKit")
@ -834,8 +874,17 @@ CGRect IASKCGRectSwap(CGRect rect);
cancelButtonTitle:NSLocalizedString(@"OK", @"InAppSettingsKit")
otherButtonTitles:nil];
[alert show];
)
IASK_IF_IOS8_OR_GREATER
(
UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Mail not configured", @"InAppSettingsKit")
message:NSLocalizedString(@"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.", @"InAppSettingsKit")
preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"InAppSettingsKit") style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {}]];
[self presentViewController:alert animated:YES completion:nil];
)
}
} else if ([[specifier type] isEqualToString:kIASKCustomViewSpecifier] && [self.delegate respondsToSelector:@selector(settingsViewController:tableView:didSelectCustomViewSpecifier:)]) {
[self.delegate settingsViewController:self tableView:tableView didSelectCustomViewSpecifier:specifier];
} else if ([[specifier type] isEqualToString:kIASKPSRadioGroupSpecifier]) {
@ -866,16 +915,15 @@ CGRect IASKCGRectSwap(CGRect rect);
#pragma mark -
#pragma mark UITextFieldDelegate Functions
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
- (void)textFieldDidBeginEditing:(UITextField *)textField {
self.currentFirstResponder = textField;
return YES;
}
- (void)_textChanged:(id)sender {
IASKTextField *text = sender;
[_settingsStore setObject:[text text] forKey:[text key]];
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged
object:[text key]
object:self
userInfo:[NSDictionary dictionaryWithObject:[text text]
forKey:[text key]]];
}
@ -890,6 +938,40 @@ CGRect IASKCGRectSwap(CGRect rect);
[self.tableView endEditing:NO];
}
#pragma mark - UITextViewDelegate
- (void)textViewDidEndEditing:(UITextView *)textView {
self.currentFirstResponder = textView;
}
- (void)textViewDidChange:(IASKTextView *)textView {
[self cacheRowHeightForTextView:textView];
CGRect visibleTableRect = UIEdgeInsetsInsetRect(self.tableView.bounds, self.tableView.contentInset);
NSIndexPath *indexPath = [self.settingsReader indexPathForKey:textView.key];
CGRect cellFrame = [self.tableView rectForRowAtIndexPath:indexPath];
if (!CGRectContainsRect(visibleTableRect, cellFrame)) {
[self.tableView scrollRectToVisible:CGRectInset(cellFrame, 0, - 30) animated:YES];
}
[_settingsStore setObject:textView.text forKey:textView.key];
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged
object:textView.key
userInfo:@{textView.key: textView.text}];
}
- (void)cacheRowHeightForTextView:(IASKTextView *)textView {
CGFloat maxHeight = self.tableView.bounds.size.height - self.tableView.contentInset.top - self.tableView.contentInset.bottom - 60;
CGFloat contentHeight = [textView sizeThatFits:CGSizeMake(textView.frame.size.width, 10000)].height + 16;
self.rowHeights[textView.key] = @(MAX(44, MIN(maxHeight, contentHeight)));
textView.scrollEnabled = contentHeight > maxHeight;
[self.tableView beginUpdates];
[self.tableView endUpdates];
}
#pragma mark Notifications
- (void)synchronizeSettings {
@ -924,7 +1006,8 @@ static NSDictionary *oldUserDefaults = nil;
}
- (void)didChangeSettingViaIASK:(NSNotification*)notification {
[oldUserDefaults setValue:[self.settingsStore objectForKey:notification.object] forKey:notification.object];
NSString *key = notification.userInfo.allKeys.firstObject;
[oldUserDefaults setValue:notification.userInfo[key] forKey:key];
}
- (void)reload {

View file

@ -91,10 +91,9 @@
NSString *key = [[keyValue objectAtIndex:0] lowercaseString];
NSString *value = [keyValue objectAtIndex:1];
value = CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
(CFStringRef)value,
CFSTR(""),
kCFStringEncodingUTF8));
value = CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)value,
CFSTR("")));
if ([key isEqualToString:@"subject"]) {
[mailViewController setSubject:value];
@ -137,7 +136,7 @@
if (![newURL host] || [[newURL host] isEqualToString:[self.url host]]) {
return YES;
}
[[UIApplication sharedApplication] openURL:newURL options:@{} completionHandler:nil];
[[UIApplication sharedApplication] openURL:newURL options:@{} completionHandler:nil];
return NO;
}

View file

@ -13,6 +13,7 @@
@property (nonatomic, copy, readonly) NSIndexPath *checkedItem;
@property (nonatomic, strong) id<IASKSettingsStore> settingsStore;
- (id)initWithSettingsStore:(id<IASKSettingsStore>)settingsStore;
- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)updateSelectionInCell:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath;

View file

@ -11,6 +11,13 @@
@synthesize settingsStore = _settingsStore;
- (id)initWithSettingsStore:(id<IASKSettingsStore>)settingsStore {
if ((self = [super init])) {
self.settingsStore = settingsStore;
}
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:nil];
}
@ -76,7 +83,7 @@
[self.settingsStore setObject:[values objectAtIndex:indexPath.row] forKey:[_specifier key]];
[self.settingsStore synchronize];
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged
object:[_specifier key]
object:self
userInfo:@{
_specifier.key: values[indexPath.row]
}];

View file

@ -24,7 +24,7 @@
@interface IASKSpecifierValuesViewController()
@property (nonatomic, strong, readonly) IASKMultipleValueSelection *selection;
@property (nonatomic) BOOL didFirstLayout;
@end
@implementation IASKSpecifierValuesViewController
@ -62,17 +62,28 @@
if (_tableView) {
[_tableView reloadData];
// Make sure the currently checked item is visible
[_tableView scrollToRowAtIndexPath:_selection.checkedItem
atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
_selection.tableView = _tableView;
}
self.didFirstLayout = NO;
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated {
[_tableView flashScrollIndicators];
[super viewDidAppear:animated];
[_tableView flashScrollIndicators];
}
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
if (!self.didFirstLayout) {
// Make sure the currently checked item is visible
// this needs to be done as early as possible when pushing the view but after the first layout
// otherwise scrolling to the first entry doesn't respect tableView.contentInset
[_tableView scrollToRowAtIndexPath:_selection.checkedItem
atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
self.didFirstLayout = YES;
}
}
- (void)viewDidDisappear:(BOOL)animated {
@ -113,7 +124,7 @@
[_selection updateSelectionInCell:cell indexPath:indexPath];
@try {
[[cell textLabel] setText:[self.settingsReader titleForStringId:[titles objectAtIndex:indexPath.row]]];
[[cell textLabel] setText:[self.settingsReader titleForId:[titles objectAtIndex:indexPath.row]]];
}
@catch (NSException * e) {}
return cell;
@ -123,7 +134,7 @@
[_selection selectRowAtIndexPath:indexPath];
}
- (CGSize)contentSizeForViewInPopover {
- (CGSize)preferredContentSize {
return [[self view] sizeThatFits:CGSizeMake(320, 2000)];
}

View file

@ -40,10 +40,12 @@
#define kIASKShortTitles @"ShortTitles"
#define kIASKSupportedUserInterfaceIdioms @"SupportedUserInterfaceIdioms"
#define kIASKSubtitle @"IASKSubtitle"
#define kIASKPlaceholder @"IASKPlaceholder"
#define kIASKViewControllerClass @"IASKViewControllerClass"
#define kIASKViewControllerSelector @"IASKViewControllerSelector"
#define kIASKViewControllerStoryBoardFile @"IASKViewControllerStoryBoardFile"
#define kIASKViewControllerStoryBoardId @"IASKViewControllerStoryBoardId"
#define kIASKSegueIdentifier @"IASKSegueIdentifier"
#define kIASKButtonClass @"IASKButtonClass"
#define kIASKButtonAction @"IASKButtonAction"
#define kIASKMailComposeToRecipents @"IASKMailComposeToRecipents"
@ -85,6 +87,7 @@
#define kIASKPSTitleValueSpecifier @"PSTitleValueSpecifier"
#define kIASKPSTextFieldSpecifier @"PSTextFieldSpecifier"
#define kIASKPSChildPaneSpecifier @"PSChildPaneSpecifier"
#define kIASKTextViewSpecifier @"IASKTextViewSpecifier"
#define kIASKOpenURLSpecifier @"IASKOpenURLSpecifier"
#define kIASKButtonSpecifier @"IASKButtonSpecifier"
#define kIASKMailComposeSpecifier @"IASKMailComposeSpecifier"
@ -174,6 +177,20 @@ _Pragma("clang diagnostic pop")
#define IASK_IF_PRE_IOS7(...) __VA_ARGS__
#endif
#ifdef __IPHONE_8_0
#define IASK_IF_PRE_IOS8(...) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_8_0) \
{ \
__VA_ARGS__ \
} \
_Pragma("clang diagnostic pop")
#else
#define IASK_IF_PRE_IOS8(...) __VA_ARGS__
#endif
#ifdef __IPHONE_8_0
#define IASK_IF_IOS8_OR_GREATER(...) \
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) \
@ -216,7 +233,7 @@ __VA_ARGS__ \
- (NSString*)titleForSection:(NSInteger)section;
- (NSString*)keyForSection:(NSInteger)section;
- (NSString*)footerTextForSection:(NSInteger)section;
- (NSString*)titleForStringId:(NSString*)stringId;
- (NSString*)titleForId:(NSObject*)titleId;
- (NSString*)pathForImageNamed:(NSString*)image;
///the main application bundle. most often [NSBundle mainBundle]

View file

@ -99,12 +99,12 @@
}
- (NSArray*)privacySettingsSpecifiers {
NSMutableDictionary *dict = [@{kIASKTitle: NSLocalizedStringFromTable(@"Privacy", @"IASKLocalizable", @"iOS 8+ Privacy cell: title"),
NSMutableDictionary *dict = [@{kIASKTitle: [[self getBundle] localizedStringForKey:@"Privacy" value:@"" table:@"IASKLocalizable"],
kIASKKey: @"IASKPrivacySettingsCellKey",
kIASKType: kIASKOpenURLSpecifier,
kIASKFile: UIApplicationOpenSettingsURLString,
} mutableCopy];
NSString *subtitle = NSLocalizedStringWithDefaultValue(@"Open in Settings app", @"IASKLocalizable", [NSBundle mainBundle], @"", @"iOS 8+ Privacy cell: subtitle");
NSString *subtitle = [[self getBundle] localizedStringForKey:@"Open in Settings app" value:@"" table:@"IASKLocalizable"];
if (subtitle.length) {
dict [kIASKSubtitle] = subtitle;
}
@ -113,6 +113,19 @@
[[IASKSpecifier alloc] initWithSpecifier:dict]]];
}
- (NSBundle*)getBundle {
NSURL *inAppSettingsBundlePath = [[NSBundle bundleForClass:[self class]] URLForResource:@"InAppSettingsKit" withExtension:@"bundle"];
NSBundle *bundle;
if (inAppSettingsBundlePath) {
bundle = [NSBundle bundleWithURL:inAppSettingsBundlePath];
} else {
bundle = [NSBundle mainBundle];
}
return bundle;
}
- (void)_reinterpretBundle:(NSDictionary*)settingsBundle {
NSArray *preferenceSpecifiers = [settingsBundle objectForKey:kIASKPreferenceSpecifiers];
NSMutableArray *dataSource = [NSMutableArray array];
@ -222,7 +235,7 @@
}
- (NSString*)titleForSection:(NSInteger)section {
return [self titleForStringId:[self headerSpecifierForSection:section].title];
return [self titleForId:[self headerSpecifierForSection:section].title];
}
- (NSString*)keyForSection:(NSInteger)section {
@ -230,11 +243,22 @@
}
- (NSString*)footerTextForSection:(NSInteger)section {
return [self titleForStringId:[self headerSpecifierForSection:section].footerText];
return [self titleForId:[self headerSpecifierForSection:section].footerText];
}
- (NSString*)titleForStringId:(NSString*)stringId {
return [self.settingsBundle localizedStringForKey:stringId value:stringId table:self.localizationTable];
- (NSString*)titleForId:(NSObject*)titleId
{
if([titleId isKindOfClass:[NSNumber class]]) {
NSNumber* numberTitleId = (NSNumber*)titleId;
NSNumberFormatter* formatter = [NSNumberFormatter new];
[formatter setNumberStyle:NSNumberFormatterNoStyle];
return [formatter stringFromNumber:numberTitleId];
}
else
{
NSString* stringTitleId = (NSString*)titleId;
return [self.settingsBundle localizedStringForKey:stringTitleId value:stringTitleId table:self.localizationTable];
}
}
- (NSString*)pathForImageNamed:(NSString*)image {

View file

@ -34,6 +34,7 @@
- (NSString*)localizedObjectForKey:(NSString*)key;
- (NSString*)title;
- (NSString*)subtitle;
- (NSString*)placeholder;
- (NSString*)key;
- (NSString*)type;
- (NSString*)titleForCurrentValue:(id)currentValue;
@ -60,6 +61,7 @@
- (SEL)viewControllerSelector;
- (NSString*)viewControllerStoryBoardFile;
- (NSString*)viewControllerStoryBoardID;
- (NSString*)segueIdentifier;
- (Class)buttonClass;
- (SEL)buttonAction;
- (UIImage *)cellImage;

View file

@ -95,7 +95,7 @@
static NSString *const valueKey = @"value";
IASKSettingsReader *strongSettingsReader = self.settingsReader;
[titles enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSString *localizedTitle = [strongSettingsReader titleForStringId:obj];
NSString *localizedTitle = [strongSettingsReader titleForId:obj];
[temporaryMappingsForSort addObject:@{titleKey : obj,
valueKey : values[idx],
localizedTitleKey : localizedTitle,
@ -152,7 +152,7 @@
- (NSString*)localizedObjectForKey:(NSString*)key {
IASKSettingsReader *settingsReader = self.settingsReader;
return [settingsReader titleForStringId:[_specifierDict objectForKey:key]];
return [settingsReader titleForId:[_specifierDict objectForKey:key]];
}
- (NSString*)title {
@ -163,13 +163,18 @@
return [self localizedObjectForKey:kIASKSubtitle];
}
- (NSString *)placeholder {
return [self localizedObjectForKey:kIASKPlaceholder];
}
- (NSString*)footerText {
return [self localizedObjectForKey:kIASKFooterText];
}
- (Class)viewControllerClass {
[IASKAppSettingsWebViewController class]; // make sure this is linked into the binary/library
return [self classFromString:([_specifierDict objectForKey:kIASKViewControllerClass])];
NSString *classString = [_specifierDict objectForKey:kIASKViewControllerClass];
return classString ? ([self classFromString:classString] ?: [NSNull class]) : nil;
}
- (Class)classFromString:(NSString *)className {
@ -195,6 +200,10 @@
return [_specifierDict objectForKey:kIASKViewControllerStoryBoardId];
}
- (NSString*)segueIdentifier {
return [_specifierDict objectForKey:kIASKSegueIdentifier];
}
- (Class)buttonClass {
return NSClassFromString([_specifierDict objectForKey:kIASKButtonClass]);
}
@ -226,7 +235,7 @@
}
@try {
IASKSettingsReader *strongSettingsReader = self.settingsReader;
return [strongSettingsReader titleForStringId:[titles objectAtIndex:keyIndex]];
return [strongSettingsReader titleForId:[titles objectAtIndex:keyIndex]];
}
@catch (NSException * e) {}
return nil;
@ -393,7 +402,7 @@
}
if ([self.type isEqualToString:kIASKButtonSpecifier] && !self.cellImage) {
return NSTextAlignmentCenter;
} else if ([self.type isEqualToString:kIASKPSMultiValueSpecifier] || [self.type isEqualToString:kIASKPSTitleValueSpecifier]) {
} else if ([self.type isEqualToString:kIASKPSMultiValueSpecifier] || [self.type isEqualToString:kIASKPSTitleValueSpecifier] || [self.type isEqualToString:kIASKTextViewSpecifier]) {
return NSTextAlignmentRight;
}
return NSTextAlignmentLeft;

View file

@ -8,4 +8,4 @@
"Privacy" = "Privacy"; // iOS 8+ Privacy cell: title
"Open in Settings app" = ""; // iOS 8+ Privacy cell: subtitle (TODO)
"Open in Settings app" = "In “Instellingen” app openen"; // iOS 8+ Privacy cell: subtitle

View file

@ -0,0 +1,23 @@
//
// IASKTextView.h
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2015:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
//
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
// as the original authors of this code. You can give credit in a blog post, a tweet or on
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
//
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
//
#import <UIKit/UIKit.h>
@interface IASKTextView : UITextView
@property (nonatomic, copy) NSString *key;
@end

View file

@ -0,0 +1,21 @@
//
// IASKTextView.m
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2015:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
//
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
// as the original authors of this code. You can give credit in a blog post, a tweet or on
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
//
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
//
#import "IASKTextView.h"
@implementation IASKTextView
@end

View file

@ -0,0 +1,24 @@
//
// IASKTextViewCell.h
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2015:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
//
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
// as the original authors of this code. You can give credit in a blog post, a tweet or on
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
//
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
//
#import <UIKit/UIKit.h>
#import "IASKTextView.h"
@interface IASKTextViewCell : UITableViewCell
@property (nonatomic, strong) IASKTextView *textView;
@end

View file

@ -0,0 +1,55 @@
//
// IASKTextViewCell.m
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2015:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
//
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
// as the original authors of this code. You can give credit in a blog post, a tweet or on
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
//
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
//
#import "IASKTextViewCell.h"
#import "IASKSettingsReader.h"
@implementation IASKTextViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.accessoryType = UITableViewCellAccessoryNone;
IASKTextView *textView = [[IASKTextView alloc] initWithFrame:CGRectZero];
textView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
textView.scrollEnabled = NO;
textView.font = [UIFont systemFontOfSize:17.0];
textView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:textView];
self.textView = textView;
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
UIEdgeInsets padding = (UIEdgeInsets) { 0, kIASKPaddingLeft, 0, kIASKPaddingRight };
if ([self respondsToSelector:@selector(layoutMargins)]) {
padding = self.layoutMargins;
padding.left -= 5;
padding.right -= 5;
padding.top -= 5;
padding.bottom -= 5;
}
self.textView.frame = UIEdgeInsetsInsetRect(self.bounds, padding);
}
@end

View file

@ -66,13 +66,8 @@
- (NSString *)urlEncode
{
NSString* encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(
NULL,
(CFStringRef) self,
NULL,
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8 );
return [encodedString autorelease];
NSString *encodedString = [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
return encodedString;
}
@end

View file

@ -164,7 +164,7 @@ static BOOL GCOAuthUseHTTPSCookieStorage = YES;
NSURL *URL = self.URL;
// Use CFURLCopyPath so that the path is preserved with trailing slash, then escape the percents ourselves
NSString *pathWithPrevervedTrailingSlash = [CFBridgingRelease(CFURLCopyPath((CFURLRef)URL)) stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *pathWithPrevervedTrailingSlash = [CFBridgingRelease(CFURLCopyPath((CFURLRef)URL)) stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *URLString = [NSString stringWithFormat:@"%@://%@%@",
[[URL scheme] lowercaseString],
@ -393,11 +393,6 @@ static BOOL GCOAuthUseHTTPSCookieStorage = YES;
@implementation NSString (GCOAuthAdditions)
- (NSString *)pcen {
CFStringRef string = CFURLCreateStringByAddingPercentEscapes(NULL,
(CFStringRef)self,
NULL,
CFSTR("!*'();:@&=+$,/?%#[]"),
kCFStringEncodingUTF8);
return [(NSString *)string autorelease];
return [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
}
@end