diff --git a/ObjectiveC/Calendar101/Calendar101.xcodeproj/project.pbxproj b/ObjectiveC/Calendar101/Calendar101.xcodeproj/project.pbxproj index f3d2c0d..65160dd 100644 --- a/ObjectiveC/Calendar101/Calendar101.xcodeproj/project.pbxproj +++ b/ObjectiveC/Calendar101/Calendar101.xcodeproj/project.pbxproj @@ -7,11 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 8456E5A41C7EA2C1007DBBC9 /* XuniCalendarKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E5A21C7EA2C1007DBBC9 /* XuniCalendarKit.framework */; }; - 8456E5A51C7EA2C1007DBBC9 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E5A31C7EA2C1007DBBC9 /* XuniCoreKit.framework */; }; + 4C82378F1D26727C002D2BFE /* XuniCalendarDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C82378E1D26727C002D2BFE /* XuniCalendarDesignTimeStoryboardSupport.m */; }; + 4C876D141D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D121D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework */; }; + 4C876D151D2583C100AEBAD8 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D131D2583C100AEBAD8 /* XuniCoreDynamicKit.framework */; }; + 4C876D161D2583C500AEBAD8 /* XuniCalendarDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D121D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework */; }; + 4C876D171D2583C500AEBAD8 /* XuniCalendarDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D121D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C876D181D2583C500AEBAD8 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D131D2583C100AEBAD8 /* XuniCoreDynamicKit.framework */; }; + 4C876D191D2583C500AEBAD8 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C876D131D2583C100AEBAD8 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 849720C11C647ABB001F538B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 849720C01C647ABB001F538B /* main.m */; }; 849720C41C647ABB001F538B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 849720C31C647ABB001F538B /* AppDelegate.m */; }; - 849720C71C647ABB001F538B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 849720C61C647ABB001F538B /* ViewController.m */; }; 849720CA1C647ABB001F538B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 849720C81C647ABB001F538B /* Main.storyboard */; }; 849720CC1C647ABB001F538B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 849720CB1C647ABB001F538B /* Assets.xcassets */; }; 849720CF1C647ABB001F538B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 849720CD1C647ABB001F538B /* LaunchScreen.storyboard */; }; @@ -25,15 +29,31 @@ 849720F11C647E09001F538B /* VerticalOrientationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 849720EA1C647E09001F538B /* VerticalOrientationController.m */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C876D1A1D2583C500AEBAD8 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C876D191D2583C500AEBAD8 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C876D171D2583C500AEBAD8 /* XuniCalendarDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ - 8456E5A21C7EA2C1007DBBC9 /* XuniCalendarKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCalendarKit.framework; path = "../DerivedData/XuniCalendar/Build/Products/Debug-framework/XuniCalendarKit.framework"; sourceTree = ""; }; - 8456E5A31C7EA2C1007DBBC9 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../DerivedData/XuniCalendar/Build/Products/Debug-framework/XuniCoreKit.framework"; sourceTree = ""; }; + 4C37D42B1CD30E32009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 4C37D42C1CD30E33009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 4C82378E1D26727C002D2BFE /* XuniCalendarDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniCalendarDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniCalendarDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4C876D121D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCalendarDynamicKit.framework; path = ../../../Controls/XuniCalendarDynamicKit.framework; sourceTree = ""; }; + 4C876D131D2583C100AEBAD8 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; 849720BC1C647ABB001F538B /* Calendar101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calendar101.app; sourceTree = BUILT_PRODUCTS_DIR; }; 849720C01C647ABB001F538B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 849720C21C647ABB001F538B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 849720C31C647ABB001F538B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 849720C51C647ABB001F538B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 849720C61C647ABB001F538B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 849720C91C647ABB001F538B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 849720CB1C647ABB001F538B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 849720CE1C647ABB001F538B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -61,19 +81,43 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8456E5A41C7EA2C1007DBBC9 /* XuniCalendarKit.framework in Frameworks */, - 8456E5A51C7EA2C1007DBBC9 /* XuniCoreKit.framework in Frameworks */, + 4C876D161D2583C500AEBAD8 /* XuniCalendarDynamicKit.framework in Frameworks */, + 4C876D141D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework in Frameworks */, + 4C876D181D2583C500AEBAD8 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C876D151D2583C100AEBAD8 /* XuniCoreDynamicKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4CA1F2451CCE7AEB004B1C98 /* Samples */ = { + isa = PBXGroup; + children = ( + 849720E91C647E09001F538B /* VerticalOrientationController.h */, + 849720EA1C647E09001F538B /* VerticalOrientationController.m */, + 849720E71C647E09001F538B /* PopupEditorController.h */, + 849720E81C647E09001F538B /* PopupEditorController.m */, + 849720DD1C647E09001F538B /* CustomAppearanceController.h */, + 849720DE1C647E09001F538B /* CustomAppearanceController.m */, + 849720DF1C647E09001F538B /* CustomDayContentController.h */, + 849720E01C647E09001F538B /* CustomDayContentController.m */, + 849720E11C647E09001F538B /* CustomHeaderController.h */, + 849720E21C647E09001F538B /* CustomHeaderController.m */, + 849720E31C647E09001F538B /* CustomSelectionController.h */, + 849720E41C647E09001F538B /* CustomSelectionController.m */, + 849720E51C647E09001F538B /* GettingStartedController.h */, + 849720E61C647E09001F538B /* GettingStartedController.m */, + ); + name = Samples; + sourceTree = ""; + }; 849720B31C647ABB001F538B = { isa = PBXGroup; children = ( - 8456E5A21C7EA2C1007DBBC9 /* XuniCalendarKit.framework */, - 8456E5A31C7EA2C1007DBBC9 /* XuniCoreKit.framework */, + 4C82378E1D26727C002D2BFE /* XuniCalendarDesignTimeStoryboardSupport.m */, + 4C876D121D2583C100AEBAD8 /* XuniCalendarDynamicKit.framework */, + 4C876D131D2583C100AEBAD8 /* XuniCoreDynamicKit.framework */, 849720BE1C647ABB001F538B /* Calendar101 */, 849720BD1C647ABB001F538B /* Products */, ); @@ -90,31 +134,16 @@ 849720BE1C647ABB001F538B /* Calendar101 */ = { isa = PBXGroup; children = ( + 4CA1F2451CCE7AEB004B1C98 /* Samples */, 849720C21C647ABB001F538B /* AppDelegate.h */, 849720C31C647ABB001F538B /* AppDelegate.m */, 849720CB1C647ABB001F538B /* Assets.xcassets */, - 849720DD1C647E09001F538B /* CustomAppearanceController.h */, - 849720DE1C647E09001F538B /* CustomAppearanceController.m */, - 849720DF1C647E09001F538B /* CustomDayContentController.h */, - 849720E01C647E09001F538B /* CustomDayContentController.m */, - 849720E11C647E09001F538B /* CustomHeaderController.h */, - 849720E21C647E09001F538B /* CustomHeaderController.m */, - 849720E31C647E09001F538B /* CustomSelectionController.h */, - 849720E41C647E09001F538B /* CustomSelectionController.m */, - 849720E51C647E09001F538B /* GettingStartedController.h */, - 849720E61C647E09001F538B /* GettingStartedController.m */, 849720D01C647ABB001F538B /* Info.plist */, 849720CD1C647ABB001F538B /* LaunchScreen.storyboard */, 849720DA1C647D1A001F538B /* License.h */, 849720DB1C647D1A001F538B /* License.m */, 849720C81C647ABB001F538B /* Main.storyboard */, - 849720E71C647E09001F538B /* PopupEditorController.h */, - 849720E81C647E09001F538B /* PopupEditorController.m */, 849720BF1C647ABB001F538B /* Supporting Files */, - 849720E91C647E09001F538B /* VerticalOrientationController.h */, - 849720EA1C647E09001F538B /* VerticalOrientationController.m */, - 849720C51C647ABB001F538B /* ViewController.h */, - 849720C61C647ABB001F538B /* ViewController.m */, ); path = Calendar101; sourceTree = ""; @@ -137,6 +166,7 @@ 849720B81C647ABB001F538B /* Sources */, 849720B91C647ABB001F538B /* Frameworks */, 849720BA1C647ABB001F538B /* Resources */, + 4C876D1A1D2583C500AEBAD8 /* Embed Frameworks */, ); buildRules = ( ); @@ -199,11 +229,11 @@ files = ( 849720ED1C647E09001F538B /* CustomHeaderController.m in Sources */, 849720F01C647E09001F538B /* PopupEditorController.m in Sources */, - 849720C71C647ABB001F538B /* ViewController.m in Sources */, 849720C41C647ABB001F538B /* AppDelegate.m in Sources */, 849720EE1C647E09001F538B /* CustomSelectionController.m in Sources */, 849720C11C647ABB001F538B /* main.m in Sources */, 849720DC1C647D1A001F538B /* License.m in Sources */, + 4C82378F1D26727C002D2BFE /* XuniCalendarDesignTimeStoryboardSupport.m in Sources */, 849720F11C647E09001F538B /* VerticalOrientationController.m in Sources */, 849720EF1C647E09001F538B /* GettingStartedController.m in Sources */, 849720EB1C647E09001F538B /* CustomAppearanceController.m in Sources */, @@ -218,6 +248,7 @@ isa = PBXVariantGroup; children = ( 849720C91C647ABB001F538B /* Base */, + 4C37D42C1CD30E33009113A8 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -226,6 +257,7 @@ isa = PBXVariantGroup; children = ( 849720CE1C647ABB001F538B /* Base */, + 4C37D42B1CD30E32009113A8 /* ja */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -324,6 +356,7 @@ "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( "$(inherited)", ../../../Controls, + ../../../../Controls, ); INFOPLIST_FILE = Calendar101/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -342,6 +375,7 @@ "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( "$(inherited)", ../../../Controls, + ../../../Controls, ); INFOPLIST_FILE = Calendar101/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/ObjectiveC/Calendar101/Calendar101/AppDelegate.m b/ObjectiveC/Calendar101/Calendar101/AppDelegate.m index b95438d..757a3c2 100644 --- a/ObjectiveC/Calendar101/Calendar101/AppDelegate.m +++ b/ObjectiveC/Calendar101/Calendar101/AppDelegate.m @@ -6,7 +6,7 @@ // #import "AppDelegate.h" -#import "XuniCoreKit/XuniCoreKit.h" +@import XuniCoreDynamicKit; #import "License.h" @interface AppDelegate () diff --git a/ObjectiveC/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard b/ObjectiveC/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard index c63d31c..6b42e95 100644 --- a/ObjectiveC/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard +++ b/ObjectiveC/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,9 @@ - + - + + @@ -13,37 +14,31 @@ - + - - + - - - - + + + + + + diff --git a/ObjectiveC/Calendar101/Calendar101/Base.lproj/Localizable.strings b/ObjectiveC/Calendar101/Calendar101/Base.lproj/Localizable.strings new file mode 100644 index 0000000..6c05d6d --- /dev/null +++ b/ObjectiveC/Calendar101/Calendar101/Base.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2015 GrapeCity. All rights reserved. +*/ diff --git a/ObjectiveC/Calendar101/Calendar101/Base.lproj/Main.storyboard b/ObjectiveC/Calendar101/Calendar101/Base.lproj/Main.storyboard index f1f66bd..10812ac 100644 --- a/ObjectiveC/Calendar101/Calendar101/Base.lproj/Main.storyboard +++ b/ObjectiveC/Calendar101/Calendar101/Base.lproj/Main.storyboard @@ -1,27 +1,13 @@ - + - + + + - - - - - - - - - - - - - - - - - + @@ -32,72 +18,95 @@ + + + + + + + + + + + + + + + - + - - + + - + - - + + - + - - - + + + + + + + + + - - + - + + + + + - + + + + + + + + + + + + + - - + + + + + + - - - - - - - + + + - - - - - - - - - - - - - - - - - - - + - + @@ -108,14 +117,33 @@ + + + + + + + + + + + + + + + + + + + - + - + @@ -126,12 +154,32 @@ + + + + + + + + + + + + + + + + + + + + - + @@ -149,9 +197,9 @@ - + - + @@ -162,14 +210,41 @@ + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -180,12 +255,452 @@ + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ObjectiveC/Calendar101/Calendar101/CustomAppearanceController.m b/ObjectiveC/Calendar101/Calendar101/CustomAppearanceController.m index 070a053..87d782e 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomAppearanceController.m +++ b/ObjectiveC/Calendar101/Calendar101/CustomAppearanceController.m @@ -6,9 +6,10 @@ // #import "CustomAppearanceController.h" -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface CustomAppearanceController () +@property (weak, nonatomic) IBOutlet XuniCalendar *calendar; @end @@ -16,56 +17,26 @@ @implementation CustomAppearanceController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Custom Appearance"]; - // Do any additional setup after loading the view. - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.borderColor = [UIColor blackColor]; - calendar.borderWidth = 5.0; + // Do any additional setup after loading the view. + self.calendar.borderColor = [UIColor blackColor]; + self.calendar.borderWidth = 5.0; - calendar.headerBackgroundColor = [UIColor colorWithRed:61 / 255.0 green:131 / 255.0 blue:75 / 255.0 alpha:1.0]; - calendar.headerTextColor = [UIColor whiteColor]; - calendar.headerFont = [UIFont boldSystemFontOfSize:28.0]; + self.calendar.headerBackgroundColor = [UIColor colorWithRed:61 / 255.0 green:131 / 255.0 blue:75 / 255.0 alpha:1.0]; + self.calendar.headerTextColor = [UIColor whiteColor]; + self.calendar.headerFont = [UIFont boldSystemFontOfSize:28.0]; - calendar.dayOfWeekFormat = XuniDayOfWeekFormatD; - calendar.dayOfWeekBackgroundColor = [UIColor colorWithRed:99 / 255.0 green:166 / 255.0 blue:70 / 255.0 alpha:1.0]; - calendar.dayOfWeekTextColor = [UIColor whiteColor]; - calendar.dayOfWeekFont = [UIFont boldSystemFontOfSize:20.0]; + self.calendar.dayOfWeekFormat = XuniDayOfWeekFormatD; + self.calendar.dayOfWeekBackgroundColor = [UIColor colorWithRed:99 / 255.0 green:166 / 255.0 blue:70 / 255.0 alpha:1.0]; + self.calendar.dayOfWeekTextColor = [UIColor whiteColor]; + self.calendar.dayOfWeekFont = [UIFont boldSystemFontOfSize:20.0]; - calendar.dayBorderColor = [UIColor colorWithRed:242 / 255.0 green:242 / 255.0 blue:242 / 255.0 alpha:1.0]; - calendar.dayBorderWidth = 2; + self.calendar.dayBorderColor = [UIColor colorWithRed:242 / 255.0 green:242 / 255.0 blue:242 / 255.0 alpha:1.0]; + self.calendar.dayBorderWidth = 2; - calendar.adjacentDayTextColor = [UIColor grayColor]; - calendar.calendarFont = [UIFont systemFontOfSize:14.0]; - calendar.todayFont = [UIFont italicSystemFontOfSize:16.0]; - - calendar.tag = 1; - - [self.view addSubview:calendar]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - calendar.frame = CGRectMake(0, 70, width, width - 70); -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. + self.calendar.adjacentDayTextColor = [UIColor grayColor]; + self.calendar.calendarFont = [UIFont systemFontOfSize:14.0]; + self.calendar.todayFont = [UIFont italicSystemFontOfSize:16.0]; } -*/ @end diff --git a/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.h b/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.h index f206e15..c4ecff1 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.h +++ b/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.h @@ -6,7 +6,7 @@ // #import -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface CustomDayContentController : UIViewController diff --git a/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.m b/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.m index f58eda3..d83dd36 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.m +++ b/ObjectiveC/Calendar101/Calendar101/CustomDayContentController.m @@ -8,6 +8,7 @@ #import "CustomDayContentController.h" @interface CustomDayContentController () +@property (weak, nonatomic) IBOutlet XuniCalendar *calendar; @end @@ -18,47 +19,28 @@ @implementation CustomDayContentController { - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Custom Day Content"]; - // Do any additional setup after loading the view. weatherIcon = [[NSArray alloc] initWithObjects:@"sunny", @"cloudy", @"rainy", @"stomy", nil]; dotIcon = [[NSArray alloc] initWithObjects:@"blue", @"red", @"green", nil]; - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.delegate = self; - calendar.dayOfWeekFormat = XuniDayOfWeekFormatDDDD; - calendar.calendarFont = [UIFont systemFontOfSize:14]; - calendar.todayFont = [UIFont boldSystemFontOfSize:14]; - calendar.tag = 1; - - [self.view addSubview:calendar]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} + self.calendar.delegate = self; + self.calendar.dayOfWeekFormat = XuniDayOfWeekFormatDDDD; + self.calendar.calendarFont = [UIFont systemFontOfSize:14]; + self.calendar.todayFont = [UIFont boldSystemFontOfSize:14]; -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - calendar.frame = CGRectMake(0, 75, width, width - 75); } -- (void)dayOfWeekSlotLoading:(XuniCalendar *)sender args:(XuniCalendarDayOfWeekSlotLoadingEventArgs *)args { - args.dayOfWeekSlot.font = args.isWeekend ? [UIFont italicSystemFontOfSize:11.0] : [UIFont boldSystemFontOfSize:11.0]; +- (void)dayOfWeekSlotLoading:(XuniCalendar *)sender dayOfWeek:(XuniDayOfWeek)dayOfWeek isWeekend:(BOOL)isWeekend dayOfWeekSlot:(UILabel*)dayOfWeekSlot { + dayOfWeekSlot.font = isWeekend ? [UIFont italicSystemFontOfSize:11.0] : [UIFont boldSystemFontOfSize:11.0]; } -- (void)daySlotLoading:(XuniCalendar *)sender args:(XuniCalendarDaySlotLoadingEventArgs *)args { - if (args.isAdjacentDay) { - return; +- (XuniCalendarDaySlotBase*)daySlotLoading:(XuniCalendar *)sender date:(NSDate*)date isAdjacentDay:(BOOL)isAdjacentDay daySlot:(XuniCalendarDaySlotBase*)daySlot { + if (isAdjacentDay) { + return daySlot; } - NSInteger day = [[NSCalendar currentCalendar] components:NSCalendarUnitDay fromDate:args.date].day; - CGRect rect = args.daySlot.frame; + NSInteger day = [[NSCalendar currentCalendar] components:NSCalendarUnitDay fromDate:date].day; + CGRect rect = daySlot.frame; CGSize size = rect.size; CGRect rect1, rect2; XuniCalendarImageDaySlot *imageDaySlot = [[XuniCalendarImageDaySlot alloc] initWithCalendar:sender frame:rect]; @@ -81,17 +63,7 @@ - (void)daySlotLoading:(XuniCalendar *)sender args:(XuniCalendarDaySlotLoadingEv imageDaySlot.imageSource = [UIImage imageNamed:[dotIcon objectAtIndex:(day % 3)]]; } - args.daySlot = imageDaySlot; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. + return imageDaySlot; } -*/ @end diff --git a/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.h b/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.h index 52606b4..b4d45ad 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.h +++ b/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.h @@ -6,8 +6,8 @@ // #import -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; -@interface CustomHeaderController : UIViewController +@interface CustomHeaderController : UIViewController @end diff --git a/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.m b/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.m index efb240d..bcc6b7a 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.m +++ b/ObjectiveC/Calendar101/Calendar101/CustomHeaderController.m @@ -8,111 +8,60 @@ #import "CustomHeaderController.h" @interface CustomHeaderController () +@property (weak, nonatomic) IBOutlet UILabel *dateLabel; +@property (weak, nonatomic) IBOutlet UISegmentedControl *modeSelector; +@property (weak, nonatomic) IBOutlet XuniCalendar *calendar; @end @implementation CustomHeaderController { - NSArray *viewTypePickerData; NSDateFormatter *dateFormatter; + BOOL isEnglish; +} + +- (IBAction)selectToday:(id)sender { + self.calendar.selectedDate = [NSDate date]; + self.calendar.displayDate = [NSDate date]; +} + +- (IBAction)selectMode:(id)sender { + if (self.modeSelector.selectedSegmentIndex == 0) { + [self.calendar changeViewModeAsync:XuniCalendarViewModeMonth date:nil]; + } + else if (self.modeSelector.selectedSegmentIndex == 1) { + [self.calendar changeViewModeAsync:XuniCalendarViewModeYear date:nil]; + } } - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Custom Header"]; - // Do any additional setup after loading the view. - viewTypePickerData = [[NSArray alloc] initWithObjects:@"Month View", @"Year View", nil]; dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]]; - UIPickerView *viewTypePicker = [[UIPickerView alloc] init]; - viewTypePicker.delegate = self; - viewTypePicker.showsSelectionIndicator = YES; - viewTypePicker.hidden = false; - viewTypePicker.tag = 2; - - UILabel *dateLabel = [[UILabel alloc] init]; - dateLabel.text = @""; - dateLabel.tag = 3; - - UIButton *todayBtn = [UIButton buttonWithType:UIButtonTypeSystem]; - [todayBtn setTitle:@"Today" forState:UIControlStateNormal]; - [todayBtn addTarget:self action:@selector(todayBtnClick:) forControlEvents:UIControlEventTouchUpInside]; - todayBtn.tag = 4; - - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.delegate = self; - calendar.showHeader = NO; - calendar.tag = 1; - - [self.view addSubview:viewTypePicker]; - [self.view addSubview:dateLabel]; - [self.view addSubview:todayBtn]; - [self.view addSubview:calendar]; + NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0]; + isEnglish = ![language containsString:@"ja"] && ![language containsString:@"zh"]; + + self.calendar.delegate = self; + self.calendar.showHeader = NO; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self updateDateLabel]; } -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - UIPickerView *viewTypePicker = (UIPickerView *)[self.view viewWithTag:2]; - UILabel *dateLabel = (UILabel *)[self.view viewWithTag:3]; - UIButton *todayBtn = (UIButton *)[self.view viewWithTag:4]; - - viewTypePicker.frame = CGRectMake(0, 55, 150, 120); - dateLabel.frame = CGRectMake(170, 120, 130, 30); - todayBtn.frame = CGRectMake(300, 120, 60, 30); - calendar.frame = CGRectMake(0, 55 + 100, width, width - 55 - 120); -} - -- (void)todayBtnClick:(id)sender { - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - calendar.selectedDate = [NSDate date]; - calendar.displayDate = [NSDate date]; -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { - return [viewTypePickerData count]; -} -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; +- (void)viewModeChanged:(XuniCalendar *)sender { - if (pickerView.tag == 2) { - if (row == 0) { - calendar.viewMode = XuniCalendarViewModeMonth; - } - else if (row == 1) { - calendar.viewMode = XuniCalendarViewModeYear; - } + if (self.calendar.viewMode == XuniCalendarViewModeMonth) { + self.modeSelector.selectedSegmentIndex = 0; } -} - -- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { - if(pickerView.tag == 2) { - return [viewTypePickerData objectAtIndex:row]; + else if (self.calendar.viewMode == XuniCalendarViewModeYear) { + self.modeSelector.selectedSegmentIndex = 1; } - else { - return @"error"; - } -} - -- (void)viewModeChanged:(XuniCalendar *)sender { + [self updateDateLabel]; } @@ -121,21 +70,12 @@ - (void)displayDateChanged:(XuniCalendar *)sender { } - (void)updateDateLabel { - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - UILabel *dateLabel = (UILabel *)[self.view viewWithTag:3]; + XuniCalendar *calendar = self.calendar; + UILabel *dateLabel = self.dateLabel; - dateFormatter.dateFormat = (calendar.viewMode == XuniCalendarViewModeMonth) ? @"MMMM yyyy" : @"yyyy"; + dateFormatter.dateFormat = (calendar.viewMode == XuniCalendarViewModeMonth) ? (isEnglish ? @"MMMM yyyy" : @"yyyy年M月") : @"yyyy"; dateLabel.text = [dateFormatter stringFromDate:calendar.displayDate]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.h b/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.h index 25a3fe6..362a857 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.h +++ b/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.h @@ -6,7 +6,7 @@ // #import -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface CustomSelectionController : UIViewController diff --git a/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.m b/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.m index 5e85206..8139f80 100644 --- a/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.m +++ b/ObjectiveC/Calendar101/Calendar101/CustomSelectionController.m @@ -8,6 +8,7 @@ #import "CustomSelectionController.h" @interface CustomSelectionController () +@property (weak, nonatomic) IBOutlet XuniCalendar *calendar; @end @@ -22,18 +23,8 @@ - (void)viewDidLoad { // Do any additional setup after loading the view. components = [[NSDateComponents alloc] init]; - UILabel *stepsLabel = [[UILabel alloc] init]; - stepsLabel.numberOfLines = 3; - stepsLabel.text = @"Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected."; - stepsLabel.tag = 2; - - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.delegate = self; - calendar.maxSelectionCount = 100; - calendar.tag = 1; - - [self.view addSubview:stepsLabel]; - [self.view addSubview:calendar]; + self.calendar.delegate = self; + self.calendar.maxSelectionCount = 100; } - (void)didReceiveMemoryWarning { @@ -41,28 +32,15 @@ - (void)didReceiveMemoryWarning { // Dispose of any resources that can be recreated. } -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - UILabel *stepsLabel = (UILabel *)[self.view viewWithTag:2]; - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - - stepsLabel.frame = CGRectMake(0, 55, width, 100); - calendar.frame = CGRectMake(0, 55 + 100, width, width - 55 -100); -} - -- (void)selectionChanging:(XuniCalendar *)sender args:(XuniCalendarSelectionChangedEventArgs *)args { - - for (NSDate *date = args.selectedDates.startDate; - [date compare:args.selectedDates.endDate] == NSOrderedAscending - || [date compare:args.selectedDates.endDate] == NSOrderedSame; +- (void)selectionChanging:(XuniCalendar *)sender selectedDates:(XuniCalendarRange*)selectedDates { + for (NSDate *date = selectedDates.startDate; + [date compare:selectedDates.endDate] == NSOrderedAscending + || [date compare:selectedDates.endDate] == NSOrderedSame; date = [self getNextDateOf:date]) { NSInteger weekday = [[[NSCalendar currentCalendar] components:NSCalendarUnitWeekday fromDate:date] weekday]; if (weekday == 1 || weekday == 7) { - [args.selectedDates addExcludedDates:date]; + [selectedDates addExcludedDates:date]; } } } @@ -72,14 +50,5 @@ - (NSDate *)getNextDateOf:(NSDate *)date { return [[NSCalendar currentCalendar] dateByAddingComponents:components toDate:date options:0]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/Calendar101/Calendar101/GettingStartedController.m b/ObjectiveC/Calendar101/Calendar101/GettingStartedController.m index 3d641b4..c8211b3 100644 --- a/ObjectiveC/Calendar101/Calendar101/GettingStartedController.m +++ b/ObjectiveC/Calendar101/Calendar101/GettingStartedController.m @@ -6,7 +6,7 @@ // #import "GettingStartedController.h" -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface GettingStartedController () @@ -16,27 +16,6 @@ @implementation GettingStartedController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Getting Started"]; - - // Do any additional setup after loading the view. - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.tag = 1; - - [self.view addSubview:calendar]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - calendar.frame = CGRectMake(0, 75, width, width - 75); } @end diff --git a/ObjectiveC/Calendar101/Calendar101/PopupEditorController.h b/ObjectiveC/Calendar101/Calendar101/PopupEditorController.h index a378ad5..1050d72 100644 --- a/ObjectiveC/Calendar101/Calendar101/PopupEditorController.h +++ b/ObjectiveC/Calendar101/Calendar101/PopupEditorController.h @@ -6,7 +6,7 @@ // #import -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface PopupEditorController : UIViewController diff --git a/ObjectiveC/Calendar101/Calendar101/PopupEditorController.m b/ObjectiveC/Calendar101/Calendar101/PopupEditorController.m index 8d38727..3a37d47 100644 --- a/ObjectiveC/Calendar101/Calendar101/PopupEditorController.m +++ b/ObjectiveC/Calendar101/Calendar101/PopupEditorController.m @@ -23,6 +23,7 @@ - (void)viewDidLoad { dateFormatter = [[NSDateFormatter alloc] init]; XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; + calendar.headerBackgroundColor = [UIColor whiteColor]; calendar.delegate = self; calendar.hidden = YES; calendar.tag = 1; @@ -36,9 +37,17 @@ - (void)viewDidLoad { dateLabel.text = @""; dateLabel.tag = 3; + UIView *view = [[UIView alloc]initWithFrame:CGRectZero]; + view.backgroundColor = [UIColor whiteColor]; + view.userInteractionEnabled = YES; + view.layer.cornerRadius = 4; + view.tag = 4; + [self.view addSubview:pickBtn]; [self.view addSubview:dateLabel]; + [self.view addSubview:view]; [self.view addSubview:calendar]; + } - (void)didReceiveMemoryWarning { @@ -46,6 +55,12 @@ - (void)didReceiveMemoryWarning { // Dispose of any resources that can be recreated. } +- (void)viewWillDisappear:(BOOL)animated +{ + self.view.backgroundColor = [UIColor whiteColor]; + self.navigationController.navigationBar.barTintColor = [UIColor whiteColor]; +} + - (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; @@ -54,34 +69,40 @@ - (void)viewDidLayoutSubviews { XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; UIButton *pickBtn = (UIButton *)[self.view viewWithTag:2]; UILabel *dateLabel = (UILabel *)[self.view viewWithTag:3]; + UIView *view = (UIView *)[self.view viewWithTag:4]; pickBtn.frame = CGRectMake(10, 55 + 10, size.width - 10 - 10, 30); dateLabel.frame = CGRectMake((size.width - 280) / 2, 55 + 50, 280, 30); calendar.frame = CGRectMake((size.width - width) / 2, 55 + 140, width, width); + view.frame = CGRectMake((size.width - width) / 2 - 4, 55 + 140 - 4, width + 8, width + 8); } - (void)pickBtnClick:(id)sender { XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; calendar.hidden = !calendar.hidden; + if (calendar.hidden == NO) { + self.view.backgroundColor = [UIColor lightGrayColor]; + self.navigationController.navigationBar.barTintColor = [UIColor lightGrayColor]; + } + else + { + self.view.backgroundColor = [UIColor whiteColor]; + self.navigationController.navigationBar.barTintColor = [UIColor whiteColor]; + } } -- (void)selectionChanged:(XuniCalendar *)sender args:(XuniCalendarSelectionChangedEventArgs *)args { +- (void)selectionChanged:(XuniCalendar *)sender selectedDates:(XuniCalendarRange*)selectedDates { XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; UILabel *dateLabel = (UILabel *)[self.view viewWithTag:3]; dateFormatter.dateFormat = @"M/d/yyyy"; - dateLabel.text = [NSString stringWithFormat:@"The date %@ was selected.", [dateFormatter stringFromDate:args.selectedDates.startDate]]; + dateLabel.text = [NSString stringWithFormat:@"The date %@ was selected.", [dateFormatter stringFromDate:selectedDates.startDate]]; calendar.hidden = YES; + if (calendar.hidden == YES) { + self.view.backgroundColor = [UIColor whiteColor]; + self.navigationController.navigationBar.barTintColor = [UIColor whiteColor]; + } } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/Calendar101/Calendar101/VerticalOrientationController.m b/ObjectiveC/Calendar101/Calendar101/VerticalOrientationController.m index f21bc31..bc5d5e9 100644 --- a/ObjectiveC/Calendar101/Calendar101/VerticalOrientationController.m +++ b/ObjectiveC/Calendar101/Calendar101/VerticalOrientationController.m @@ -6,9 +6,10 @@ // #import "VerticalOrientationController.h" -#import "XuniCalendarKit/XuniCalendarKit.h" +@import XuniCalendarDynamicKit; @interface VerticalOrientationController () +@property (weak, nonatomic) IBOutlet XuniCalendar *calendar; @end @@ -16,38 +17,7 @@ @implementation VerticalOrientationController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Vertical Orientation"]; - - // Do any additional setup after loading the view. - XuniCalendar *calendar = [[XuniCalendar alloc] initWithFrame:CGRectZero]; - calendar.orientation = XuniCalendarOrientationVertical; - calendar.tag = 1; - - [self.view addSubview:calendar]; + self.calendar.orientation = XuniCalendarOrientationVertical; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - CGSize size = self.view.bounds.size; - CGFloat width = fminf(size.width, size.height); - XuniCalendar *calendar = (XuniCalendar *)[self.view viewWithTag:1]; - calendar.frame = CGRectMake(0, 75, width, width - 75); -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/ObjectiveC/Calendar101/Calendar101/en.lproj/Localizable.strings b/ObjectiveC/Calendar101/Calendar101/en.lproj/Localizable.strings new file mode 100644 index 0000000..e5586ab --- /dev/null +++ b/ObjectiveC/Calendar101/Calendar101/en.lproj/Localizable.strings @@ -0,0 +1,49 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2015 GrapeCity. All rights reserved. +*/ + +// Samples Title +"Getting Started" = "Getting Started"; + +"Vertical Orientation" = "Vertical Orientation"; + +"Custom Day Content" = "Custom Day Content"; + +"Custom Header" = "Custom Header"; + +"Custom Appearance" = "Custom Appearance"; + +"Popup Editor" = "Popup Editor"; + +"Custom Selection" = "Custom Selection"; + +// Samples Description +"Shows a basic calendar with selection and interaction." = "Shows a basic calendar with selection and interaction."; + +"Shows a calendar with vertical navigation/scrolling." = "Shows a calendar with vertical navigation/scrolling."; + +"Shows how to customize a day slot to show custom content." = "Shows how to customize a day slot to show custom content."; + +"Shows a custom header inspired by a popular Android or iOS calendar app." = "Shows a custom header inspired by a popular Android or iOS calendar app."; + +"Shows a calendar with a custom style." = "Shows a calendar with a custom style."; + +"Shows how to use the control as a pop-up date selector." = "Shows how to use the control as a pop-up date selector."; + +"Shows custom selection scenarios." = "Shows custom selection scenarios."; + +// Strings +"Month View" = "Month View"; + +"Year View" = "Year View"; + +"Today" = "Today"; + +"Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected." = "Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected."; + +"Pick a date" = "Pick a date"; + +"The date %@ was selected." = "The date %@ was selected."; diff --git a/ObjectiveC/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings b/ObjectiveC/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings new file mode 100644 index 0000000..de52d85 --- /dev/null +++ b/ObjectiveC/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings @@ -0,0 +1,6 @@ + +/* Class = "UILabel"; text = " Copyright (c) 2016 GrapeCity. All rights reserved."; ObjectID = "9Ch-tF-3Ra"; */ +"9Ch-tF-3Ra.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; + +/* Class = "UILabel"; text = "Calendar101"; ObjectID = "U5r-rf-sf8"; */ +"U5r-rf-sf8.text" = "Calendar101"; diff --git a/ObjectiveC/Calendar101/Calendar101/ja.lproj/Localizable.strings b/ObjectiveC/Calendar101/Calendar101/ja.lproj/Localizable.strings new file mode 100644 index 0000000..f614c63 --- /dev/null +++ b/ObjectiveC/Calendar101/Calendar101/ja.lproj/Localizable.strings @@ -0,0 +1,49 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2016 GrapeCity. All rights reserved. +*/ + +// Samples Title +"Getting Started" = "Calendar の基本機能"; + +"Vertical Orientation" = "垂直方向の操作"; + +"Custom Day Content" = "日付領域の変更"; + +"Custom Header" = "ヘッダーのカスタマイズ"; + +"Custom Appearance" = "外観のカスタマイズ"; + +"Popup Editor" = "選択画面"; + +"Custom Selection" = "日付選択のカスタマイズ"; + +// Samples Description +"Shows a basic calendar with selection and interaction." = "カレンダーの日付選択と対話操作"; + +"Shows a calendar with vertical navigation/scrolling." = "縦方向にめくり、スクロール"; + +"Shows how to customize a day slot to show custom content." = "日付を表示する領域に画像など独自の表現を設定"; + +"Shows a custom header inspired by a popular Android or iOS calendar app." = "AndroidやiOSでおなじみの形にカスタマイズ"; + +"Shows a calendar with a custom style." = "独自スタイルを設定したカレンダー"; + +"Shows how to use the control as a pop-up date selector." = "日付選択用の画面をポップアップ表示"; + +"Shows custom selection scenarios." = "カスタマイズした日付選択の利用例"; + +// Strings +"Month View" = "月表示"; + +"Year View" = "年表示"; + +"Today" = "今日"; + +"Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected." = "ステップ1: 日付を選択\nステップ2: 他の週の日付を選択\n結果: 週末を除いた日付のみが選択状態になります"; + +"Pick a date" = "日付の選択"; + +"The date %@ was selected." = " %@ が選択されました"; diff --git a/ObjectiveC/Calendar101/Calendar101/ja.lproj/Main.strings b/ObjectiveC/Calendar101/Calendar101/ja.lproj/Main.strings new file mode 100644 index 0000000..a9af391 --- /dev/null +++ b/ObjectiveC/Calendar101/Calendar101/ja.lproj/Main.strings @@ -0,0 +1,105 @@ + +/* Class = "UILabel"; text = "Shows how to use the control as a pop-up date selector"; ObjectID = "0HI-zA-RCs"; */ +"0HI-zA-RCs.text" = "Shows how to use the control as a pop-up date selector"; + +/* Class = "UILabel"; text = "Vertical Orientation"; ObjectID = "0Nj-ZU-T5v"; */ +"0Nj-ZU-T5v.text" = "Vertical Orientation"; + +/* Class = "UITableViewController"; title = "Calendar101"; ObjectID = "0R6-jw-zkF"; */ +"0R6-jw-zkF.title" = "Calendar101"; + +/* Class = "UILabel"; text = ">"; ObjectID = "1bA-g4-CVS"; */ +"1bA-g4-CVS.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "3Rs-q1-T7Z"; */ +"3Rs-q1-T7Z.text" = ">"; + +/* Class = "UIBarButtonItem"; title = "Today"; ObjectID = "8j6-O0-4Q4"; */ +"8j6-O0-4Q4.title" = "Today"; + +/* Class = "UILabel"; text = ">"; ObjectID = "C8f-b3-dfv"; */ +"C8f-b3-dfv.text" = ">"; + +/* Class = "UINavigationItem"; title = "Custom Day Content"; ObjectID = "H0l-ky-yYx"; */ +"H0l-ky-yYx.title" = "Custom Day Content"; + +/* Class = "UILabel"; text = "Custom Selection"; ObjectID = "J1v-Ac-Fc2"; */ +"J1v-Ac-Fc2.text" = "Custom Selection"; + +/* Class = "UILabel"; text = "Shows custom selection scenarios"; ObjectID = "K3Y-fL-wIP"; */ +"K3Y-fL-wIP.text" = "Shows custom selection scenarios"; + +/* Class = "UINavigationItem"; title = "Custom Appearance"; ObjectID = "MGE-lf-VHs"; */ +"MGE-lf-VHs.title" = "Custom Appearance"; + +/* Class = "UILabel"; text = ">"; ObjectID = "MMz-IR-Bsc"; */ +"MMz-IR-Bsc.text" = ">"; + +/* Class = "UILabel"; text = "Shows a calendar with vertical navigation/scrolling"; ObjectID = "NIM-N7-jll"; */ +"NIM-N7-jll.text" = "Shows a calendar with vertical navigation/scrolling"; + +/* Class = "UILabel"; text = "Getting Started"; ObjectID = "NQl-kn-6CR"; */ +"NQl-kn-6CR.text" = "Getting Started"; + +/* Class = "UINavigationItem"; title = "Custom Header"; ObjectID = "Pju-Sf-Y9T"; */ +"Pju-Sf-Y9T.title" = "Custom Header"; + +/* Class = "UILabel"; text = "Shows a basic calendar with selection and interaction"; ObjectID = "QuJ-WX-DHe"; */ +"QuJ-WX-DHe.text" = "Shows a basic calendar with selection and interaction"; + +/* Class = "UILabel"; text = "Custom Appearance"; ObjectID = "RM7-yp-3hJ"; */ +"RM7-yp-3hJ.text" = "Custom Appearance"; + +/* Class = "UILabel"; text = "Custom Header"; ObjectID = "SBF-Rv-TpF"; */ +"SBF-Rv-TpF.text" = "Custom Header"; + +/* Class = "UILabel"; text = "Label"; ObjectID = "SNj-QB-QKl"; */ +"SNj-QB-QKl.text" = "Label"; + +/* Class = "UILabel"; text = "Popup Editor"; ObjectID = "Sb2-tA-wqI"; */ +"Sb2-tA-wqI.text" = "Popup Editor"; + +/* Class = "UISegmentedControl"; Uid-0L-7EV.segmentTitles[0] = "Month"; ObjectID = "Uid-0L-7EV"; */ +"Uid-0L-7EV.segmentTitles[0]" = "Month"; + +/* Class = "UISegmentedControl"; Uid-0L-7EV.segmentTitles[1] = "Year"; ObjectID = "Uid-0L-7EV"; */ +"Uid-0L-7EV.segmentTitles[1]" = "Year"; + +/* Class = "UILabel"; text = "Shows a calendar with a custom style"; ObjectID = "Xi1-s4-npw"; */ +"Xi1-s4-npw.text" = "Shows a calendar with a custom style"; + +/* Class = "UILabel"; text = "Shows a custom header inspired by a popular Android or iOS calendar app"; ObjectID = "ZaX-XG-k3O"; */ +"ZaX-XG-k3O.text" = "Shows a custom header inspired by a popular Android or iOS calendar app"; + +/* Class = "UILabel"; text = ">"; ObjectID = "bEZ-7Z-hbL"; */ +"bEZ-7Z-hbL.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "d82-8O-bpn"; */ +"d82-8O-bpn.text" = ">"; + +/* Class = "UINavigationItem"; title = "Calendar101"; ObjectID = "f7P-D1-vH0"; */ +"f7P-D1-vH0.title" = "Calendar101"; + +/* Class = "UILabel"; text = "Shows how to customize a day slot to show custom content"; ObjectID = "jNU-sj-ZJZ"; */ +"jNU-sj-ZJZ.text" = "Shows how to customize a day slot to show custom content"; + +/* Class = "UINavigationItem"; title = "Vertical Orientation"; ObjectID = "jbF-Qn-Ylf"; */ +"jbF-Qn-Ylf.title" = "Vertical Orientation"; + +/* Class = "UILabel"; text = ">"; ObjectID = "muQ-Dv-j0T"; */ +"muQ-Dv-j0T.text" = ">"; + +/* Class = "UILabel"; text = "Custom Day Content"; ObjectID = "oky-vv-ZVE"; */ +"oky-vv-ZVE.text" = "Custom Day Content"; + +/* Class = "UINavigationItem"; title = "Custom Selection"; ObjectID = "tqq-2h-9gq"; */ +"tqq-2h-9gq.title" = "Custom Selection"; + +/* Class = "UINavigationItem"; title = "Getting Started"; ObjectID = "uKQ-Hb-dhw"; */ +"uKQ-Hb-dhw.title" = "Getting Started"; + +/* Class = "UINavigationController"; title = "Calendar101"; ObjectID = "vRJ-fS-8VE"; */ +"vRJ-fS-8VE.title" = "Calendar101"; + +/* Class = "UILabel"; text = "Step1: Select a date.
Step2: Select another date in a different week.
Observe: The weekend days are not selected."; ObjectID = "ziH-bD-d63"; */ +"ziH-bD-d63.text" = "Step1: Select a date.
Step2: Select another date in a different week.
Observe: The weekend days are not selected."; diff --git a/ObjectiveC/CollectionView101/CollectionView101.xcodeproj/project.pbxproj b/ObjectiveC/CollectionView101/CollectionView101.xcodeproj/project.pbxproj index de9e37a..9aa0351 100644 --- a/ObjectiveC/CollectionView101/CollectionView101.xcodeproj/project.pbxproj +++ b/ObjectiveC/CollectionView101/CollectionView101.xcodeproj/project.pbxproj @@ -13,8 +13,6 @@ 4C31AF7D1C74D4B90094D76F /* flexgrid_grouping.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF781C74D4B90094D76F /* flexgrid_grouping.png */; }; 4C31AF7E1C74D4B90094D76F /* flexgrid_loading.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF791C74D4B90094D76F /* flexgrid_loading.png */; }; 4C31AF7F1C74D4B90094D76F /* sort.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF7A1C74D4B90094D76F /* sort.png */; }; - 4C31AF871C74EDA40094D76F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF861C74EDA40094D76F /* Images.xcassets */; }; - 4C31AF891C74EE9D0094D76F /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */; }; 4C31AF8D1C74F0E70094D76F /* YouTubeCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C31AF8C1C74F0E70094D76F /* YouTubeCollectionView.m */; }; 4C49FECA1C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49FEC91C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.m */; }; 4C49FECD1C8F6A7400C4AAEE /* FilteringDemoCanvasTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49FECC1C8F6A7400C4AAEE /* FilteringDemoCanvasTableViewController.m */; }; @@ -23,10 +21,13 @@ 4C51F8361C5F4A2600244503 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C51F8341C5F4A2600244503 /* Main.storyboard */; }; 4C51F83B1C5F4A2600244503 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C51F8391C5F4A2600244503 /* LaunchScreen.storyboard */; }; 4C51F8441C5F4C8E00244503 /* SampleData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C51F8431C5F4C8E00244503 /* SampleData.m */; }; + 4C65887B1D2418CF00E1F7CF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4C65887A1D2418CF00E1F7CF /* Images.xcassets */; }; + 4C7CDA921D26E09D00F61693 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7CDA911D26E09D00F61693 /* XuniCoreKit.framework */; }; 4CE12DCD1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DCC1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.m */; }; 4CE12DD01C86147F0049DF13 /* FilteringSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DCF1C86147F0049DF13 /* FilteringSampleViewController.m */; }; 4CE12DD31C8614AA0049DF13 /* GroupingSampleTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DD21C8614AA0049DF13 /* GroupingSampleTableViewController.m */; }; 4CE12DD61C8614C70049DF13 /* YouTubeOnDemandSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DD51C8614C70049DF13 /* YouTubeOnDemandSampleViewController.m */; }; + 843786601CD3085300903308 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 843786621CD3085300903308 /* Localizable.strings */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -37,8 +38,6 @@ 4C31AF781C74D4B90094D76F /* flexgrid_grouping.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_grouping.png; sourceTree = ""; }; 4C31AF791C74D4B90094D76F /* flexgrid_loading.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_loading.png; sourceTree = ""; }; 4C31AF7A1C74D4B90094D76F /* sort.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sort.png; sourceTree = ""; }; - 4C31AF861C74EDA40094D76F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ../Images.xcassets; sourceTree = ""; }; - 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; 4C31AF8B1C74F0E70094D76F /* YouTubeCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeCollectionView.h; sourceTree = ""; }; 4C31AF8C1C74F0E70094D76F /* YouTubeCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YouTubeCollectionView.m; sourceTree = ""; }; 4C49FEC81C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeOnDemandCanvasTableViewController.h; sourceTree = ""; }; @@ -56,6 +55,8 @@ 4C51F83C1C5F4A2600244503 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4C51F8421C5F4C8E00244503 /* SampleData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleData.h; sourceTree = ""; }; 4C51F8431C5F4C8E00244503 /* SampleData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SampleData.m; sourceTree = ""; }; + 4C65887A1D2418CF00E1F7CF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 4C7CDA911D26E09D00F61693 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = ../../../Controls/XuniCoreKit.framework; sourceTree = ""; }; 4CE12DCB1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleOnDemandSampleTableViewController.h; sourceTree = ""; }; 4CE12DCC1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleOnDemandSampleTableViewController.m; sourceTree = ""; }; 4CE12DCE1C86147F0049DF13 /* FilteringSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilteringSampleViewController.h; sourceTree = ""; }; @@ -64,6 +65,9 @@ 4CE12DD21C8614AA0049DF13 /* GroupingSampleTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupingSampleTableViewController.m; sourceTree = ""; }; 4CE12DD41C8614C70049DF13 /* YouTubeOnDemandSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeOnDemandSampleViewController.h; sourceTree = ""; }; 4CE12DD51C8614C70049DF13 /* YouTubeOnDemandSampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YouTubeOnDemandSampleViewController.m; sourceTree = ""; }; + 843786611CD3085300903308 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + 843786631CD3085900903308 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 843786641CD3085A00903308 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -71,7 +75,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C31AF891C74EE9D0094D76F /* XuniCoreKit.framework in Frameworks */, + 4C7CDA921D26E09D00F61693 /* XuniCoreKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -104,7 +108,7 @@ 4C51F81F1C5F4A2600244503 = { isa = PBXGroup; children = ( - 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */, + 4C7CDA911D26E09D00F61693 /* XuniCoreKit.framework */, 4C51F82A1C5F4A2600244503 /* CollectionView101 */, 4C51F8291C5F4A2600244503 /* Products */, ); @@ -121,7 +125,7 @@ 4C51F82A1C5F4A2600244503 /* CollectionView101 */ = { isa = PBXGroup; children = ( - 4C31AF861C74EDA40094D76F /* Images.xcassets */, + 4C65887A1D2418CF00E1F7CF /* Images.xcassets */, 4C31AF751C74D4A90094D76F /* Images */, 4C31AF8A1C74F0C80094D76F /* SampleData */, 4CE12DCE1C86147F0049DF13 /* FilteringSampleViewController.h */, @@ -144,6 +148,7 @@ 4C51F8391C5F4A2600244503 /* LaunchScreen.storyboard */, 4C51F83C1C5F4A2600244503 /* Info.plist */, 4C51F82B1C5F4A2600244503 /* Supporting Files */, + 843786621CD3085300903308 /* Localizable.strings */, ); path = CollectionView101; sourceTree = ""; @@ -197,6 +202,7 @@ knownRegions = ( en, Base, + ja, ); mainGroup = 4C51F81F1C5F4A2600244503; productRefGroup = 4C51F8291C5F4A2600244503 /* Products */; @@ -214,9 +220,10 @@ buildActionMask = 2147483647; files = ( 4C31AF7B1C74D4B90094D76F /* collectionview.png in Resources */, - 4C31AF871C74EDA40094D76F /* Images.xcassets in Resources */, + 4C65887B1D2418CF00E1F7CF /* Images.xcassets in Resources */, 4C51F83B1C5F4A2600244503 /* LaunchScreen.storyboard in Resources */, 4C31AF7E1C74D4B90094D76F /* flexgrid_loading.png in Resources */, + 843786601CD3085300903308 /* Localizable.strings in Resources */, 4C31AF7F1C74D4B90094D76F /* sort.png in Resources */, 4C31AF7C1C74D4B90094D76F /* filter.png in Resources */, 4C51F8361C5F4A2600244503 /* Main.storyboard in Resources */, @@ -266,6 +273,16 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; + 843786621CD3085300903308 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 843786611CD3085300903308 /* Base */, + 843786631CD3085900903308 /* en */, + 843786641CD3085A00903308 /* ja */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -359,8 +376,10 @@ "$(inherited)", ../../../Controls, ../../../../Controls, + "$(PROJECT_DIR)", ); INFOPLIST_FILE = CollectionView101/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.grapecity.xuni.CollectionView101; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -375,8 +394,10 @@ "$(inherited)", ../../../Controls, ../../../../Controls, + "$(PROJECT_DIR)", ); INFOPLIST_FILE = CollectionView101/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.grapecity.xuni.CollectionView101; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/LaunchScreen.storyboard b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/LaunchScreen.storyboard index f9f02a9..f0ab7c6 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/LaunchScreen.storyboard +++ b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,8 @@ - + - + diff --git a/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Localizable.strings b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Localizable.strings new file mode 100644 index 0000000..79a37c0 --- /dev/null +++ b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Main.storyboard b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Main.storyboard index 5900681..2669818 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Main.storyboard +++ b/ObjectiveC/CollectionView101/CollectionView101/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + diff --git a/ObjectiveC/CollectionView101/CollectionView101/FilteringSampleViewController.m b/ObjectiveC/CollectionView101/CollectionView101/FilteringSampleViewController.m index 6123271..620ab16 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/FilteringSampleViewController.m +++ b/ObjectiveC/CollectionView101/CollectionView101/FilteringSampleViewController.m @@ -18,12 +18,12 @@ @implementation FilteringSampleViewController -(void) searchBody { FilteringDemoCanvasTableViewController* canvas = [self.childViewControllers objectAtIndex:0]; - canvas.collectionView.filter = ^(NSObject *item) { + canvas.collectionView.filter = ^BOOL(NSObject *item) { if(!self.searchRequest.text.length) { - return (bool)true; + return true; } SampleData *sd = (SampleData *)item; - return (bool)([[sd.title uppercaseString] containsString:[self.searchRequest.text uppercaseString]] || [[sd.description uppercaseString] containsString:[self.searchRequest.text uppercaseString]]); + return ([[sd.title uppercaseString] containsString:[self.searchRequest.text uppercaseString]] || [[sd.description uppercaseString] containsString:[self.searchRequest.text uppercaseString]]); }; [canvas.tableView reloadData]; diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Contents.json b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..c4071ec --- /dev/null +++ b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,81 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-Small-40@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x-1-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000..6092bc7 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..d468678 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000..2f7ac47 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png new file mode 100644 index 0000000..abee98b Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small.png new file mode 100644 index 0000000..72b0164 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/ObjectiveC/CollectionView101/CollectionView101/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png differ diff --git a/ObjectiveC/CollectionView101/CollectionView101/SortingSampleTableViewController.m b/ObjectiveC/CollectionView101/CollectionView101/SortingSampleTableViewController.m index 2e9c049..4853a39 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/SortingSampleTableViewController.m +++ b/ObjectiveC/CollectionView101/CollectionView101/SortingSampleTableViewController.m @@ -27,7 +27,7 @@ - (void)viewDidLoad { } - (IBAction)doSort:(id)sender { - if([self.sortButton.title isEqualToString:@"Sort Z-A"]) + if([self.sortButton.title isEqualToString:NSLocalizedString(@"Sort Z-A", nil)]) { XuniSortDescription* sd = [[XuniSortDescription alloc] initWithProperty:@"title" ascending:NO]; @@ -36,7 +36,7 @@ - (IBAction)doSort:(id)sender { [self.collectionView.sortDescriptions addObject:sd]; [self.tableView reloadData]; - self.sortButton.title = @"Sort A-Z"; + self.sortButton.title = NSLocalizedString(@"Sort A-Z", nil); } else { @@ -47,7 +47,7 @@ - (IBAction)doSort:(id)sender { [self.collectionView.sortDescriptions addObject:sd]; [self.tableView reloadData]; - self.sortButton.title = @"Sort Z-A"; + self.sortButton.title = NSLocalizedString(@"Sort Z-A", nil); } } diff --git a/ObjectiveC/CollectionView101/CollectionView101/YouTubeCollectionView.m b/ObjectiveC/CollectionView101/CollectionView101/YouTubeCollectionView.m index 84a4d27..f7a334c 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/YouTubeCollectionView.m +++ b/ObjectiveC/CollectionView101/CollectionView101/YouTubeCollectionView.m @@ -35,6 +35,9 @@ - (NSMutableArray *)itemGetter:(NSNumber *)desiredNumber { NSData *dataResult = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]; NSError *error = nil; + + if(dataResult == nil) return nil; + id object = [NSJSONSerialization JSONObjectWithData:dataResult options:0 diff --git a/ObjectiveC/CollectionView101/CollectionView101/en.lproj/Localizable.strings b/ObjectiveC/CollectionView101/CollectionView101/en.lproj/Localizable.strings new file mode 100644 index 0000000..7f7059a --- /dev/null +++ b/ObjectiveC/CollectionView101/CollectionView101/en.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ + +"Sort A-Z" = "Sort A-Z"; + +"Sort Z-A" = "Sort Z-A"; \ No newline at end of file diff --git a/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Localizable.strings b/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Localizable.strings new file mode 100644 index 0000000..00c7da1 --- /dev/null +++ b/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ + +"Sort A-Z" = "昇順(A-Z)"; + +"Sort Z-A" = "降順(Z-A)"; \ No newline at end of file diff --git a/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Main.strings b/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Main.strings index 17c3950..13399e6 100644 --- a/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Main.strings +++ b/ObjectiveC/CollectionView101/CollectionView101/ja.lproj/Main.strings @@ -3,91 +3,91 @@ "0Wn-El-nmX.text" = ">"; /* Class = "UILabel"; text = "Sorting"; ObjectID = "0ft-v2-ojG"; */ -"0ft-v2-ojG.text" = "Sorting"; +"0ft-v2-ojG.text" = "ソート"; /* Class = "UILabel"; text = "Detail"; ObjectID = "4na-Qg-5gl"; */ -"4na-Qg-5gl.text" = "Detail"; +"4na-Qg-5gl.text" = "詳細"; /* Class = "UILabel"; text = "Displays a grouped list of YouTube videos"; ObjectID = "5gY-WI-I4l"; */ -"5gY-WI-I4l.text" = "Displays a grouped list of YouTube videos"; +"5gY-WI-I4l.text" = "リストをグループ化して表示"; /* Class = "UIViewController"; title = "YouTube OnDemand"; ObjectID = "69x-Gx-Nb6"; */ -"69x-Gx-Nb6.title" = "YouTube OnDemand"; +"69x-Gx-Nb6.title" = "YouTube オンデマンド"; /* Class = "UILabel"; text = "Shows on-demand loading with a ListView"; ObjectID = "6QK-Cc-y15"; */ -"6QK-Cc-y15.text" = "Shows on-demand loading with a ListView"; +"6QK-Cc-y15.text" = "表示時にデータを要求してリストビューに読み込み"; /* Class = "UINavigationController"; title = "CollectionView101"; ObjectID = "798-98-Js3"; */ "798-98-Js3.title" = "CollectionView101"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "7ih-MR-4Cm"; */ -"7ih-MR-4Cm.title" = "Sorting"; +"7ih-MR-4Cm.title" = "ソート"; /* Class = "UITableViewController"; title = "CollectionView101"; ObjectID = "A3s-lV-pdi"; */ "A3s-lV-pdi.title" = "CollectionView101"; /* Class = "UILabel"; text = "Title"; ObjectID = "Anb-IA-gi3"; */ -"Anb-IA-gi3.text" = "Title"; +"Anb-IA-gi3.text" = "タイトル"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "DtY-OV-zVb"; */ -"DtY-OV-zVb.title" = "Back"; +"DtY-OV-zVb.title" = "戻る"; /* Class = "UINavigationItem"; title = "Grouping"; ObjectID = "Eop-Sz-bMd"; */ -"Eop-Sz-bMd.title" = "Grouping"; +"Eop-Sz-bMd.title" = "グループ化"; /* Class = "UINavigationItem"; title = "Filtering Demo"; ObjectID = "F1y-Xk-xGA"; */ -"F1y-Xk-xGA.title" = "Filtering Demo"; +"F1y-Xk-xGA.title" = "フィルタリング"; /* Class = "UILabel"; text = "Simple OnDemand"; ObjectID = "F73-Yk-65J"; */ -"F73-Yk-65J.text" = "Simple OnDemand"; +"F73-Yk-65J.text" = "シンプルオンデマンド"; /* Class = "UITextField"; placeholder = "Enter your search request"; ObjectID = "FzP-fF-yx0"; */ -"FzP-fF-yx0.placeholder" = "Enter your search request"; +"FzP-fF-yx0.placeholder" = "検索するキーワードを入力"; /* Class = "UILabel"; text = "Sort a list of items from the action bar"; ObjectID = "GLZ-02-Gdg"; */ -"GLZ-02-Gdg.text" = "Sort a list of items from the action bar"; +"GLZ-02-Gdg.text" = "アクションバーを操作して項目をソート"; /* Class = "UITableViewController"; title = "Filtering Subview"; ObjectID = "HE6-a9-uUW"; */ -"HE6-a9-uUW.title" = "Filtering Subview"; +"HE6-a9-uUW.title" = "フィルター処理 補助画面"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[0] = "Relevance"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[0]" = "Relevance"; +"IfT-lu-aWn.segmentTitles[0]" = "関連性"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[1] = "Date"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[1]" = "Date"; +"IfT-lu-aWn.segmentTitles[1]" = "日付"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[2] = "View Count"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[2]" = "View Count"; +"IfT-lu-aWn.segmentTitles[2]" = "閲覧数"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[3] = "Rating"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[3]" = "Rating"; +"IfT-lu-aWn.segmentTitles[3]" = "評価"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[4] = "Title"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[4]" = "Title"; +"IfT-lu-aWn.segmentTitles[4]" = "タイトル"; /* Class = "UILabel"; text = "Detail"; ObjectID = "IpZ-Hb-7b0"; */ -"IpZ-Hb-7b0.text" = "Detail"; +"IpZ-Hb-7b0.text" = "詳細"; /* Class = "UILabel"; text = "Filtering"; ObjectID = "JAY-lX-H0m"; */ -"JAY-lX-H0m.text" = "Filtering"; +"JAY-lX-H0m.text" = "フィルター処理"; /* Class = "UINavigationItem"; title = "Simple OnDemand"; ObjectID = "JXY-hG-Bev"; */ -"JXY-hG-Bev.title" = "Simple OnDemand"; +"JXY-hG-Bev.title" = "シンプルオンデマンド"; /* Class = "UINavigationItem"; title = "Sorting"; ObjectID = "Jcm-u1-tk4"; */ -"Jcm-u1-tk4.title" = "Sorting"; +"Jcm-u1-tk4.title" = "ソート"; /* Class = "UILabel"; text = "Grouping"; ObjectID = "KOu-Xm-dsd"; */ -"KOu-Xm-dsd.text" = "Grouping"; +"KOu-Xm-dsd.text" = "グループ化"; /* Class = "UILabel"; text = ">"; ObjectID = "L4e-gD-TaT"; */ "L4e-gD-TaT.text" = ">"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "PaI-0O-mFv"; */ -"PaI-0O-mFv.title" = "Back"; +"PaI-0O-mFv.title" = "戻る"; /* Class = "UILabel"; text = "Detail"; ObjectID = "S6E-uQ-8gP"; */ -"S6E-uQ-8gP.text" = "Detail"; +"S6E-uQ-8gP.text" = "詳細"; /* Class = "UILabel"; text = ">"; ObjectID = "W5a-cG-S8t"; */ "W5a-cG-S8t.text" = ">"; @@ -96,58 +96,58 @@ "XJb-4a-6I6.text" = ">"; /* Class = "UIViewController"; title = "Filtering Demo"; ObjectID = "ZzD-FA-sPI"; */ -"ZzD-FA-sPI.title" = "Filtering Demo"; +"ZzD-FA-sPI.title" = "フィルター処理"; /* Class = "UILabel"; text = "Shows on-demand loading with YouTube API"; ObjectID = "aEa-i1-YqZ"; */ -"aEa-i1-YqZ.text" = "Shows on-demand loading with YouTube API"; +"aEa-i1-YqZ.text" = "YouTube APIを使用したロードオンデマンド"; /* Class = "UILabel"; text = "Filters a list of items by typing in an Entry"; ObjectID = "ali-Ve-8YO"; */ -"ali-Ve-8YO.text" = "Filters a list of items by typing in an Entry"; +"ali-Ve-8YO.text" = "テキストを入力して項目をフィルタリング"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "amh-J3-5Vm"; */ -"amh-J3-5Vm.title" = "Back"; +"amh-J3-5Vm.title" = "戻る"; /* Class = "UIBarButtonItem"; title = "Sort"; ObjectID = "cDH-85-JES"; */ -"cDH-85-JES.title" = "Sort"; +"cDH-85-JES.title" = "ソート"; /* Class = "UILabel"; text = "Title"; ObjectID = "dnA-mh-F16"; */ -"dnA-mh-F16.text" = "Title"; +"dnA-mh-F16.text" = "タイトル"; /* Class = "UINavigationItem"; title = "CollectionView101"; ObjectID = "fCS-cL-WFr"; */ "fCS-cL-WFr.title" = "CollectionView101"; /* Class = "UILabel"; text = "Detail"; ObjectID = "ia5-D3-eAA"; */ -"ia5-D3-eAA.text" = "Detail"; +"ia5-D3-eAA.text" = "詳細"; /* Class = "UILabel"; text = "Title"; ObjectID = "lkP-cp-Jjv"; */ -"lkP-cp-Jjv.text" = "Title"; +"lkP-cp-Jjv.text" = "タイトル"; /* Class = "UITextField"; placeholder = "Enter your search request"; ObjectID = "m8O-7S-noj"; */ -"m8O-7S-noj.placeholder" = "Enter your search request"; +"m8O-7S-noj.placeholder" = "検索するキーワードを入力"; /* Class = "UILabel"; text = "YouTube OnDemand"; ObjectID = "qaW-JU-eaf"; */ -"qaW-JU-eaf.text" = "YouTube OnDemand"; +"qaW-JU-eaf.text" = "YouTube オンデマンド"; /* Class = "UILabel"; text = "Title"; ObjectID = "rKx-lQ-Ibr"; */ -"rKx-lQ-Ibr.text" = "Title"; +"rKx-lQ-Ibr.text" = "タイトル"; /* Class = "UILabel"; text = "Title"; ObjectID = "sLW-zD-73r"; */ -"sLW-zD-73r.text" = "Title"; +"sLW-zD-73r.text" = "タイトル"; /* Class = "UINavigationItem"; title = "YouTube OnDemand"; ObjectID = "snp-Lp-uik"; */ -"snp-Lp-uik.title" = "YouTube OnDemand"; +"snp-Lp-uik.title" = "YouTube オンデマンド"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "tEM-Ha-q5d"; */ -"tEM-Ha-q5d.title" = "Sorting"; +"tEM-Ha-q5d.title" = "ソート"; /* Class = "UITableViewController"; title = "Grouping"; ObjectID = "ujQ-dv-l4y"; */ -"ujQ-dv-l4y.title" = "Grouping"; +"ujQ-dv-l4y.title" = "グループ化"; /* Class = "UILabel"; text = ">"; ObjectID = "vNr-Nf-FJA"; */ "vNr-Nf-FJA.text" = ">"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "wLZ-oO-gNR"; */ -"wLZ-oO-gNR.title" = "Sorting"; +"wLZ-oO-gNR.title" = "ソート"; /* Class = "UILabel"; text = "Detail"; ObjectID = "yLd-8q-2dX"; */ -"yLd-8q-2dX.text" = "Detail"; +"yLd-8q-2dX.text" = "詳細"; diff --git a/ObjectiveC/FlexChart101/FlexChart101.xcodeproj/project.pbxproj b/ObjectiveC/FlexChart101/FlexChart101.xcodeproj/project.pbxproj index a60d16a..0668b38 100644 --- a/ObjectiveC/FlexChart101/FlexChart101.xcodeproj/project.pbxproj +++ b/ObjectiveC/FlexChart101/FlexChart101.xcodeproj/project.pbxproj @@ -7,19 +7,25 @@ objects = { /* Begin PBXBuildFile section */ + 4C87CEDC1D25BC89009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CED91D25BC89009781F5 /* XuniChartCoreDynamicKit.framework */; }; + 4C87CEDD1D25BC89009781F5 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDA1D25BC89009781F5 /* XuniCoreDynamicKit.framework */; }; + 4C87CEDE1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDB1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework */; }; + 4C87CEDF1D25BC92009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CED91D25BC89009781F5 /* XuniChartCoreDynamicKit.framework */; }; + 4C87CEE01D25BC92009781F5 /* XuniChartCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CED91D25BC89009781F5 /* XuniChartCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C87CEE11D25BC92009781F5 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDA1D25BC89009781F5 /* XuniCoreDynamicKit.framework */; }; + 4C87CEE21D25BC92009781F5 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDA1D25BC89009781F5 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C87CEE31D25BC92009781F5 /* XuniFlexChartDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDB1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework */; }; + 4C87CEE41D25BC92009781F5 /* XuniFlexChartDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CEDB1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C8978E31D268F23004E468B /* XuniFlexChartDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8978E21D268F23004E468B /* XuniFlexChartDesignTimeStoryboardSupport.m */; }; + 4CA1F25C1CCF8B7B004B1C98 /* MainMenuTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA1F25B1CCF8B7B004B1C98 /* MainMenuTableViewController.m */; }; 8407E6921BA170B3001C1582 /* LineMarkerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8407E6911BA170B3001C1582 /* LineMarkerController.m */; }; - 841A3ABA1C0593F2004853DD /* XuniChartCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841A3AB71C0593F2004853DD /* XuniChartCoreKit.framework */; }; - 841A3ABB1C0593F2004853DD /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841A3AB81C0593F2004853DD /* XuniCoreKit.framework */; }; - 841A3ABC1C0593F2004853DD /* XuniFlexChartKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841A3AB91C0593F2004853DD /* XuniFlexChartKit.framework */; }; - 8435C9491C869C11001AC90E /* ChartAnnotationsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8435C9481C869C11001AC90E /* ChartAnnotationsController.m */; }; - 84D2E7911C02C02500D46662 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84D2E7931C02C02500D46662 /* Localizable.strings */; }; 84D4F3161BCCB08D000B5960 /* ConditionalFormattingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.m */; }; 84D4F3171BCCB08D000B5960 /* CustomPlotElementsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.m */; }; 84D4F3201BCF89A1000B5960 /* ScrollingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F31F1BCF89A1000B5960 /* ScrollingController.m */; }; + 84D5BAEE1C33808E00EFD08B /* ChartAnnotationsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D5BAED1C33808E00EFD08B /* ChartAnnotationsController.m */; }; 84E33AB91B8D6BF4002AE146 /* UpdateAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.m */; }; F2160F8B1B18D45F00F3ADD5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F2160F8A1B18D45F00F3ADD5 /* main.m */; }; F2160F8E1B18D45F00F3ADD5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F2160F8D1B18D45F00F3ADD5 /* AppDelegate.m */; }; - F2160F911B18D45F00F3ADD5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2160F901B18D45F00F3ADD5 /* ViewController.m */; }; F2160F941B18D45F00F3ADD5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F2160F921B18D45F00F3ADD5 /* Main.storyboard */; }; F2160F961B18D45F00F3ADD5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F2160F951B18D45F00F3ADD5 /* Images.xcassets */; }; F2160F991B18D45F00F3ADD5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F2160F971B18D45F00F3ADD5 /* LaunchScreen.xib */; }; @@ -61,25 +67,41 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C87CEE51D25BC92009781F5 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C87CEE41D25BC92009781F5 /* XuniFlexChartDynamicKit.framework in Embed Frameworks */, + 4C87CEE21D25BC92009781F5 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C87CEE01D25BC92009781F5 /* XuniChartCoreDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 4C37D4291CD30E1B009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 4C37D42A1CD30E1B009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 4C87CED91D25BC89009781F5 /* XuniChartCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreDynamicKit.framework; path = ../../../Controls/XuniChartCoreDynamicKit.framework; sourceTree = ""; }; + 4C87CEDA1D25BC89009781F5 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C87CEDB1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexChartDynamicKit.framework; path = ../../../Controls/XuniFlexChartDynamicKit.framework; sourceTree = ""; }; + 4C8978E21D268F23004E468B /* XuniFlexChartDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniFlexChartDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniFlexChartDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4CA1F25A1CCF8B7B004B1C98 /* MainMenuTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainMenuTableViewController.h; sourceTree = ""; }; + 4CA1F25B1CCF8B7B004B1C98 /* MainMenuTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainMenuTableViewController.m; sourceTree = ""; }; 8407E6901BA170B3001C1582 /* LineMarkerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineMarkerController.h; sourceTree = ""; }; 8407E6911BA170B3001C1582 /* LineMarkerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LineMarkerController.m; sourceTree = ""; }; - 841A3AB71C0593F2004853DD /* XuniChartCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreKit.framework; path = "../DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniChartCoreKit.framework"; sourceTree = ""; }; - 841A3AB81C0593F2004853DD /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniCoreKit.framework"; sourceTree = ""; }; - 841A3AB91C0593F2004853DD /* XuniFlexChartKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexChartKit.framework; path = "../DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniFlexChartKit.framework"; sourceTree = ""; }; - 8435C9471C869C11001AC90E /* ChartAnnotationsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChartAnnotationsController.h; sourceTree = ""; }; - 8435C9481C869C11001AC90E /* ChartAnnotationsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChartAnnotationsController.m; sourceTree = ""; }; - 84D2E7821C02BAA100D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; - 84D2E7831C02BAA100D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - 84D2E7921C02C02500D46662 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; - 84D2E7941C02C02900D46662 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; lineEnding = 0; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; }; - 84D2E7951C02C02B00D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; lineEnding = 0; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; }; 84D4F3121BCCB08D000B5960 /* ConditionalFormattingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConditionalFormattingController.h; sourceTree = ""; }; 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConditionalFormattingController.m; sourceTree = ""; }; 84D4F3141BCCB08D000B5960 /* CustomPlotElementsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomPlotElementsController.h; sourceTree = ""; }; 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomPlotElementsController.m; sourceTree = ""; }; 84D4F31E1BCF89A1000B5960 /* ScrollingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingController.h; sourceTree = ""; }; 84D4F31F1BCF89A1000B5960 /* ScrollingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScrollingController.m; sourceTree = ""; }; + 84D5BAEC1C33808E00EFD08B /* ChartAnnotationsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChartAnnotationsController.h; sourceTree = ""; }; + 84D5BAED1C33808E00EFD08B /* ChartAnnotationsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChartAnnotationsController.m; sourceTree = ""; }; 84E33AB71B8D6BF4002AE146 /* UpdateAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpdateAnimationController.h; sourceTree = ""; }; 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UpdateAnimationController.m; sourceTree = ""; }; F2160F851B18D45F00F3ADD5 /* FlexChart101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlexChart101.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -87,8 +109,6 @@ F2160F8A1B18D45F00F3ADD5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; F2160F8C1B18D45F00F3ADD5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; F2160F8D1B18D45F00F3ADD5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - F2160F8F1B18D45F00F3ADD5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - F2160F901B18D45F00F3ADD5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; F2160F931B18D45F00F3ADD5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; F2160F951B18D45F00F3ADD5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; F2160F981B18D45F00F3ADD5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -152,9 +172,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 841A3ABA1C0593F2004853DD /* XuniChartCoreKit.framework in Frameworks */, - 841A3ABB1C0593F2004853DD /* XuniCoreKit.framework in Frameworks */, - 841A3ABC1C0593F2004853DD /* XuniFlexChartKit.framework in Frameworks */, + 4C87CEE11D25BC92009781F5 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C87CEDC1D25BC89009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */, + 4C87CEDD1D25BC89009781F5 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C87CEE31D25BC92009781F5 /* XuniFlexChartDynamicKit.framework in Frameworks */, + 4C87CEDE1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework in Frameworks */, + 4C87CEDF1D25BC92009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -168,77 +191,47 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - F2160F7C1B18D45F00F3ADD5 = { - isa = PBXGroup; - children = ( - 841A3AB71C0593F2004853DD /* XuniChartCoreKit.framework */, - 841A3AB81C0593F2004853DD /* XuniCoreKit.framework */, - 841A3AB91C0593F2004853DD /* XuniFlexChartKit.framework */, - F2160F871B18D45F00F3ADD5 /* FlexChart101 */, - F2160FA11B18D45F00F3ADD5 /* FlexChart101Tests */, - F2160F861B18D45F00F3ADD5 /* Products */, - ); - sourceTree = ""; - }; - F2160F861B18D45F00F3ADD5 /* Products */ = { + 4CA1F2591CCED8AB004B1C98 /* Samples */ = { isa = PBXGroup; children = ( - F2160F851B18D45F00F3ADD5 /* FlexChart101.app */, - F2160F9E1B18D45F00F3ADD5 /* FlexChart101Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - F2160F871B18D45F00F3ADD5 /* FlexChart101 */ = { - isa = PBXGroup; - children = ( - F2160F8C1B18D45F00F3ADD5 /* AppDelegate.h */, - F2160F8D1B18D45F00F3ADD5 /* AppDelegate.m */, - F2160FB11B18EABA00F3ADD5 /* BasicChartTypesController.h */, - F2160FB21B18EABA00F3ADD5 /* BasicChartTypesController.m */, - F2160FBA1B18EB1200F3ADD5 /* BubbleChartController.h */, - F2160FBB1B18EB1200F3ADD5 /* BubbleChartController.m */, - 8435C9471C869C11001AC90E /* ChartAnnotationsController.h */, - 8435C9481C869C11001AC90E /* ChartAnnotationsController.m */, - F2C5897C1B1CAAF100371F29 /* ChartData.h */, - F2C5897D1B1CAAF100371F29 /* ChartData.m */, + F2160FCC1B18EBC600F3ADD5 /* LegendAndTitlesController.h */, + F2160FCD1B18EBC600F3ADD5 /* LegendAndTitlesController.m */, 84D4F3121BCCB08D000B5960 /* ConditionalFormattingController.h */, 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.m */, F2160FC91B18EBA900F3ADD5 /* CustomizingAxesController.h */, F2160FCA1B18EBA900F3ADD5 /* CustomizingAxesController.m */, 84D4F3141BCCB08D000B5960 /* CustomPlotElementsController.h */, 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.m */, - F2160FBD1B18EB2C00F3ADD5 /* CustomTooltipsController.h */, - F2160FBE1B18EB2C00F3ADD5 /* CustomTooltipsController.m */, F2BEDB9C1B73DF4000DD2454 /* DataLabelController.h */, F2BEDB9D1B73DF4000DD2454 /* DataLabelController.m */, - F24A601D1B223614000FDBD1 /* DynamicChartData.h */, - F24A601E1B223614000FDBD1 /* DynamicChartData.m */, F2160FD81B18EC2100F3ADD5 /* DynamicChartsController.h */, F2160FD91B18EC2100F3ADD5 /* DynamicChartsController.m */, - F2160FB71B18EAFE00F3ADD5 /* FinancialChartController.h */, - F2160FB81B18EAFE00F3ADD5 /* FinancialChartController.m */, - F2C5898D1B1CF43500371F29 /* FinancialData.h */, - F2C5898E1B1CF43500371F29 /* FinancialData.m */, F2160FAE1B18EA8100F3ADD5 /* GettingStartedController.h */, F2160FAF1B18EA8100F3ADD5 /* GettingStartedController.m */, + F2160FB11B18EABA00F3ADD5 /* BasicChartTypesController.h */, + F2160FB21B18EABA00F3ADD5 /* BasicChartTypesController.m */, + F2160FB41B18EAEA00F3ADD5 /* MixedChartTypesController.h */, + F2160FB51B18EAEA00F3ADD5 /* MixedChartTypesController.m */, + F2160FBD1B18EB2C00F3ADD5 /* CustomTooltipsController.h */, + F2160FBE1B18EB2C00F3ADD5 /* CustomTooltipsController.m */, + F2160FBA1B18EB1200F3ADD5 /* BubbleChartController.h */, + F2160FBB1B18EB1200F3ADD5 /* BubbleChartController.m */, + F2160FB71B18EAFE00F3ADD5 /* FinancialChartController.h */, + F2160FB81B18EAFE00F3ADD5 /* FinancialChartController.m */, F2160FDE1B18ECF000F3ADD5 /* HitTestController.h */, F2160FDF1B18ECF000F3ADD5 /* HitTestController.m */, - F2774A421B21EE69008E721D /* HitTestData.h */, - F2774A431B21EE69008E721D /* HitTestData.m */, - F2160F951B18D45F00F3ADD5 /* Images.xcassets */, - F2160F971B18D45F00F3ADD5 /* LaunchScreen.xib */, - F2160FCC1B18EBC600F3ADD5 /* LegendAndTitlesController.h */, - F2160FCD1B18EBC600F3ADD5 /* LegendAndTitlesController.m */, - F23573661B445E3800F300D7 /* License.h */, - F23573671B445E3800F300D7 /* License.m */, + 84D5BAEC1C33808E00EFD08B /* ChartAnnotationsController.h */, + 84D5BAED1C33808E00EFD08B /* ChartAnnotationsController.m */, + F2160FC01B18EB3D00F3ADD5 /* ThemingController.h */, + F2160FC11B18EB3D00F3ADD5 /* ThemingController.m */, + F2160FD21B18EBF300F3ADD5 /* ToggleSeriesController.h */, + F2160FD31B18EBF300F3ADD5 /* ToggleSeriesController.m */, + 84E33AB71B8D6BF4002AE146 /* UpdateAnimationController.h */, + 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.m */, 8407E6901BA170B3001C1582 /* LineMarkerController.h */, 8407E6911BA170B3001C1582 /* LineMarkerController.m */, F2160FD51B18EC0E00F3ADD5 /* LoadAnimationController.h */, F2160FD61B18EC0E00F3ADD5 /* LoadAnimationController.m */, - F2160F921B18D45F00F3ADD5 /* Main.storyboard */, - F2160FB41B18EAEA00F3ADD5 /* MixedChartTypesController.h */, - F2160FB51B18EAEA00F3ADD5 /* MixedChartTypesController.m */, F254FAC01B3313FF009CD853 /* MultipleAxesController.h */, F254FAC11B3313FF009CD853 /* MultipleAxesController.m */, 84D4F31E1BCF89A1000B5960 /* ScrollingController.h */, @@ -249,20 +242,67 @@ F254FABE1B31E8BE009CD853 /* SnapshotController.m */, F2160FC61B18EB9200F3ADD5 /* StylingSeriesController.h */, F2160FC71B18EB9200F3ADD5 /* StylingSeriesController.m */, - F2160F881B18D45F00F3ADD5 /* Supporting Files */, - F2160FC01B18EB3D00F3ADD5 /* ThemingController.h */, - F2160FC11B18EB3D00F3ADD5 /* ThemingController.m */, - F2160FD21B18EBF300F3ADD5 /* ToggleSeriesController.h */, - F2160FD31B18EBF300F3ADD5 /* ToggleSeriesController.m */, - 84E33AB71B8D6BF4002AE146 /* UpdateAnimationController.h */, - 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.m */, - F2160F8F1B18D45F00F3ADD5 /* ViewController.h */, - F2160F901B18D45F00F3ADD5 /* ViewController.m */, - F254FAC31B331663009CD853 /* WeatherData.h */, - F254FAC41B331663009CD853 /* WeatherData.m */, F2160FDB1B18EC3500F3ADD5 /* ZoomingAndScrollingController.h */, F2160FDC1B18EC3500F3ADD5 /* ZoomingAndScrollingController.m */, ); + name = Samples; + sourceTree = ""; + }; + 4CA1F25D1CCFF789004B1C98 /* DataModel */ = { + isa = PBXGroup; + children = ( + F2C5898D1B1CF43500371F29 /* FinancialData.h */, + F2C5898E1B1CF43500371F29 /* FinancialData.m */, + F24A601D1B223614000FDBD1 /* DynamicChartData.h */, + F24A601E1B223614000FDBD1 /* DynamicChartData.m */, + F2C5897C1B1CAAF100371F29 /* ChartData.h */, + F2C5897D1B1CAAF100371F29 /* ChartData.m */, + F2774A421B21EE69008E721D /* HitTestData.h */, + F2774A431B21EE69008E721D /* HitTestData.m */, + F254FAC31B331663009CD853 /* WeatherData.h */, + F254FAC41B331663009CD853 /* WeatherData.m */, + ); + name = DataModel; + sourceTree = ""; + }; + F2160F7C1B18D45F00F3ADD5 = { + isa = PBXGroup; + children = ( + 4C8978E21D268F23004E468B /* XuniFlexChartDesignTimeStoryboardSupport.m */, + 4C87CED91D25BC89009781F5 /* XuniChartCoreDynamicKit.framework */, + 4C87CEDA1D25BC89009781F5 /* XuniCoreDynamicKit.framework */, + 4C87CEDB1D25BC89009781F5 /* XuniFlexChartDynamicKit.framework */, + F2160F871B18D45F00F3ADD5 /* FlexChart101 */, + F2160FA11B18D45F00F3ADD5 /* FlexChart101Tests */, + F2160F861B18D45F00F3ADD5 /* Products */, + ); + sourceTree = ""; + }; + F2160F861B18D45F00F3ADD5 /* Products */ = { + isa = PBXGroup; + children = ( + F2160F851B18D45F00F3ADD5 /* FlexChart101.app */, + F2160F9E1B18D45F00F3ADD5 /* FlexChart101Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + F2160F871B18D45F00F3ADD5 /* FlexChart101 */ = { + isa = PBXGroup; + children = ( + 4CA1F25D1CCFF789004B1C98 /* DataModel */, + 4CA1F2591CCED8AB004B1C98 /* Samples */, + F2160F8C1B18D45F00F3ADD5 /* AppDelegate.h */, + F2160F8D1B18D45F00F3ADD5 /* AppDelegate.m */, + F2160F951B18D45F00F3ADD5 /* Images.xcassets */, + F2160F971B18D45F00F3ADD5 /* LaunchScreen.xib */, + F23573661B445E3800F300D7 /* License.h */, + F23573671B445E3800F300D7 /* License.m */, + F2160F921B18D45F00F3ADD5 /* Main.storyboard */, + F2160F881B18D45F00F3ADD5 /* Supporting Files */, + 4CA1F25A1CCF8B7B004B1C98 /* MainMenuTableViewController.h */, + 4CA1F25B1CCF8B7B004B1C98 /* MainMenuTableViewController.m */, + ); path = FlexChart101; sourceTree = ""; }; @@ -271,7 +311,6 @@ children = ( F2160F891B18D45F00F3ADD5 /* Info.plist */, F2160F8A1B18D45F00F3ADD5 /* main.m */, - 84D2E7931C02C02500D46662 /* Localizable.strings */, ); name = "Supporting Files"; sourceTree = ""; @@ -303,6 +342,7 @@ F2160F811B18D45F00F3ADD5 /* Sources */, F2160F821B18D45F00F3ADD5 /* Frameworks */, F2160F831B18D45F00F3ADD5 /* Resources */, + 4C87CEE51D25BC92009781F5 /* Embed Frameworks */, ); buildRules = ( ); @@ -356,7 +396,6 @@ knownRegions = ( en, Base, - ja, ); mainGroup = F2160F7C1B18D45F00F3ADD5; productRefGroup = F2160F861B18D45F00F3ADD5 /* Products */; @@ -375,7 +414,6 @@ buildActionMask = 2147483647; files = ( F2160F941B18D45F00F3ADD5 /* Main.storyboard in Resources */, - 84D2E7911C02C02500D46662 /* Localizable.strings in Resources */, F2160F991B18D45F00F3ADD5 /* LaunchScreen.xib in Resources */, F2160F961B18D45F00F3ADD5 /* Images.xcassets in Resources */, ); @@ -399,12 +437,14 @@ 84E33AB91B8D6BF4002AE146 /* UpdateAnimationController.m in Sources */, F2160FCE1B18EBC600F3ADD5 /* LegendAndTitlesController.m in Sources */, F2C5898F1B1CF43500371F29 /* FinancialData.m in Sources */, + 4CA1F25C1CCF8B7B004B1C98 /* MainMenuTableViewController.m in Sources */, F2160FC21B18EB3D00F3ADD5 /* ThemingController.m in Sources */, - 8435C9491C869C11001AC90E /* ChartAnnotationsController.m in Sources */, + 84D5BAEE1C33808E00EFD08B /* ChartAnnotationsController.m in Sources */, F2774A441B21EE69008E721D /* HitTestData.m in Sources */, F2160FC81B18EB9200F3ADD5 /* StylingSeriesController.m in Sources */, F2BEDB9E1B73DF4000DD2454 /* DataLabelController.m in Sources */, F2160FDA1B18EC2100F3ADD5 /* DynamicChartsController.m in Sources */, + 4C8978E31D268F23004E468B /* XuniFlexChartDesignTimeStoryboardSupport.m in Sources */, F2160FE01B18ECF000F3ADD5 /* HitTestController.m in Sources */, F254FAC21B3313FF009CD853 /* MultipleAxesController.m in Sources */, F2160FB61B18EAEA00F3ADD5 /* MixedChartTypesController.m in Sources */, @@ -412,7 +452,6 @@ 8407E6921BA170B3001C1582 /* LineMarkerController.m in Sources */, F254FAC51B331663009CD853 /* WeatherData.m in Sources */, F2160FD41B18EBF300F3ADD5 /* ToggleSeriesController.m in Sources */, - F2160F911B18D45F00F3ADD5 /* ViewController.m in Sources */, F2160FD71B18EC0E00F3ADD5 /* LoadAnimationController.m in Sources */, F2160FDD1B18EC3500F3ADD5 /* ZoomingAndScrollingController.m in Sources */, F2160F8E1B18D45F00F3ADD5 /* AppDelegate.m in Sources */, @@ -451,21 +490,11 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 84D2E7931C02C02500D46662 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 84D2E7921C02C02500D46662 /* Base */, - 84D2E7941C02C02900D46662 /* en */, - 84D2E7951C02C02B00D46662 /* ja */, - ); - name = Localizable.strings; - sourceTree = ""; - }; F2160F921B18D45F00F3ADD5 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( F2160F931B18D45F00F3ADD5 /* Base */, - 84D2E7831C02BAA100D46662 /* ja */, + 4C37D42A1CD30E1B009113A8 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -474,7 +503,7 @@ isa = PBXVariantGroup; children = ( F2160F981B18D45F00F3ADD5 /* Base */, - 84D2E7821C02BAA100D46662 /* ja */, + 4C37D4291CD30E1B009113A8 /* ja */, ); name = LaunchScreen.xib; sourceTree = ""; @@ -503,6 +532,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "/Users/kotyuck/Desktop/Volumes/main-frameworks"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -548,6 +578,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "/Users/kotyuck/Desktop/Volumes/main-frameworks"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -569,6 +600,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_BITCODE = NO; @@ -576,6 +608,7 @@ "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( "$(inherited)", ../../../Controls, + ../../../../Controls, ); INFOPLIST_FILE = FlexChart101/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.3; @@ -590,16 +623,15 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - ../../../Controls, - ); + FRAMEWORK_SEARCH_PATHS = ../../../Controls; "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( "$(inherited)", ../../../Controls, + ../../../../Controls, ); INFOPLIST_FILE = FlexChart101/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.3; diff --git a/ObjectiveC/FlexChart101/FlexChart101/AppDelegate.m b/ObjectiveC/FlexChart101/FlexChart101/AppDelegate.m index bb1e932..751a3ff 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/AppDelegate.m +++ b/ObjectiveC/FlexChart101/FlexChart101/AppDelegate.m @@ -6,8 +6,10 @@ // #import "AppDelegate.h" -#import "XuniCoreKit/XuniCorekit.h" +@import XuniCoreDynamicKit; #import "License.h" +@import XuniFlexChartDynamicKit; + @interface AppDelegate () @@ -19,6 +21,7 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. [XuniLicenseManager setKey:key]; + [FlexChart class]; return YES; } diff --git a/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/LaunchScreen.xib b/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/LaunchScreen.xib index 63f3768..09883cd 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/LaunchScreen.xib +++ b/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/LaunchScreen.xib @@ -1,42 +1,39 @@ - + - + - - + + - - + - - - - - - + + + + + + - - - diff --git a/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/Main.storyboard b/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/Main.storyboard index f525750..f90fc5f 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/Main.storyboard +++ b/ObjectiveC/FlexChart101/FlexChart101/Base.lproj/Main.storyboard @@ -1,14 +1,16 @@ - + - + + + - + - + @@ -16,12 +18,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -32,17 +69,17 @@ - + - + - + @@ -50,17 +87,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -68,17 +122,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -86,17 +193,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -104,17 +243,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -122,17 +278,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -140,17 +334,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -158,17 +380,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -176,17 +426,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -194,17 +485,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -212,17 +604,40 @@ + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -230,17 +645,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -248,17 +680,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -266,75 +715,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -342,17 +806,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -360,17 +841,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -378,17 +876,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -396,17 +911,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -414,17 +972,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -432,17 +1007,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -450,17 +1066,37 @@ + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -468,17 +1104,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -486,17 +1139,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -504,17 +1174,34 @@ + + + + + + + + + + + + + + + + + - + - + - + @@ -522,12 +1209,29 @@ + + + + + + + + + + + + + + + + + - + diff --git a/ObjectiveC/FlexChart101/FlexChart101/BasicChartTypesController.m b/ObjectiveC/FlexChart101/FlexChart101/BasicChartTypesController.m index 25ff146..c21bcaa 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/BasicChartTypesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/BasicChartTypesController.m @@ -7,62 +7,58 @@ #import "BasicChartTypesController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface BasicChartTypesController (){ NSMutableArray *chartTypePickerData; NSMutableArray *stackingPickerData; } +@property (weak, nonatomic) IBOutlet UIPickerView *picker; +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation BasicChartTypesController +- (IBAction)reverseSwitched:(id)sender { + UISwitch * switchState = (UISwitch *)sender; + + NSString *temp = [[NSString alloc] init]; + if ([switchState isOn]) { + self.chart.rotated = true; + } + else + { + self.chart.rotated = false; + } + temp = self.chart.axisX.format; + self.chart.axisX.format = self.chart.axisY.format; + self.chart.axisY.format = temp; +} + + - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Basic Chart Types", nil)]; // Do any additional setup after loading the view. chartTypePickerData =[[NSMutableArray alloc] initWithObjects:@"Column", @"Bar", @"Scatter", @"Line", @"LineSymbol", @"Area", nil]; stackingPickerData = [[NSMutableArray alloc]initWithObjects: @"None", @"Stacked", @"Stacked100pc", nil]; - UIPickerView *chartTypePicker = [[UIPickerView alloc] init]; - UIPickerView *stackingPicker = [[UIPickerView alloc] init]; - - FlexChart *chart = [[FlexChart alloc] init]; - UISwitch *rotatedSwitch = [[UISwitch alloc]init]; NSMutableArray *chartData = [ChartData demoData]; - [rotatedSwitch addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; - chartTypePicker.delegate = self; - chartTypePicker.showsSelectionIndicator = YES; - chartTypePicker.hidden = false; - - stackingPicker.delegate = self; - stackingPicker.showsSelectionIndicator = YES; - stackingPicker.hidden = false; - - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; - - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; + _picker.delegate = self; - chart.itemsSource = chartData; - chart.chartType = XuniChartTypeArea; - chart.stacking = XuniStackingStacked; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart: self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart: self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart: self.chart binding:@"downloads, downloads" name:@"Downloads"]; - chart.tag = 1; - chartTypePicker.tag = 2; - stackingPicker.tag = 3; - rotatedSwitch.tag = 4; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; - [self.view addSubview:rotatedSwitch]; - [self.view addSubview:chartTypePicker]; - [self.view addSubview:stackingPicker]; - [self.view addSubview:chart]; + self.chart.itemsSource = chartData; + self.chart.chartType = XuniChartTypeArea; + self.chart.stacking = XuniStackingStacked; } - (void)didReceiveMemoryWarning { @@ -73,36 +69,19 @@ - (void)didReceiveMemoryWarning { - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - [chartTypePicker selectRow:5 inComponent:0 animated:NO]; + [self.picker selectRow:5 inComponent:0 animated:NO]; + [self.picker selectRow:1 inComponent:1 animated:NO]; - UIPickerView *stackingPicker = (UIPickerView*)[self.view viewWithTag:3]; - [stackingPicker selectRow:1 inComponent:0 animated:NO]; - UISwitch *rotatedSwitch = (UISwitch*)[self.view viewWithTag:4]; - rotatedSwitch.on = NO; } -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - UIPickerView *stackingPicker = (UIPickerView*)[self.view viewWithTag:3]; - UISwitch *rotatedSwitch = (UISwitch*)[self.view viewWithTag:4]; - chartTypePicker.frame = CGRectMake(0, 44, self.view.bounds.size.width*7/18, 162); - stackingPicker.frame = CGRectMake(self.view.bounds.size.width*7/18, 44, self.view.bounds.size.width*4/9, 162); - rotatedSwitch.frame = CGRectMake((self.view.bounds.size.width * 15/18) + 5, 110, self.view.bounds.size.width*3/18, 50); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { - return 1; + return 2; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { - - if(pickerView.tag == 2) { + if(component == 0) { return [chartTypePickerData count]; } else { @@ -111,39 +90,39 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; + - if (pickerView.tag == 2) + if (component == 0) { if (row == 0) { - chart.chartType = XuniChartTypeColumn; + self.chart.chartType = XuniChartTypeColumn; } else if (row == 1) { - chart.chartType = XuniChartTypeBar; + self.chart.chartType = XuniChartTypeBar; } else if (row == 2) { - chart.chartType = XuniChartTypeScatter; + self.chart.chartType = XuniChartTypeScatter; } else if (row == 3) { - chart.chartType = XuniChartTypeLine; + self.chart.chartType = XuniChartTypeLine; } else if (row == 4) { - chart.chartType = XuniChartTypeLineSymbols; + self.chart.chartType = XuniChartTypeLineSymbols; } else if (row == 5) { - chart.chartType = XuniChartTypeArea; + self.chart.chartType = XuniChartTypeArea; } } - else if (pickerView.tag == 3) { + else if (component==1) { if (row == 0) { - chart.stacking = XuniStackingNone; + self.chart.stacking = XuniStackingNone; } else if (row == 1) { - chart.stacking= XuniStackingStacked; + self.chart.stacking= XuniStackingStacked; } else if (row == 2) { - chart.stacking = XuniStackingStacked100pc; + self.chart.stacking = XuniStackingStacked100pc; } } @@ -151,44 +130,43 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } - (void)setAxisFormatting { - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; - if (chart.chartType == XuniChartTypeBar) { - if (chart.stacking == XuniStackingStacked100pc && chart.rotated == false) { - chart.axisX.format = @"F2"; - chart.axisY.format = @"D"; + if (self.chart.chartType == XuniChartTypeBar) { + if (self.chart.stacking == XuniStackingStacked100pc && self.chart.rotated == false) { + self.chart.axisX.format = @"F2"; + self.chart.axisY.format = @"D"; } - else if (chart.stacking == XuniStackingStacked100pc && chart.rotated == true) { - chart.axisX.format = @"D"; - chart.axisY.format = @"F2"; + else if (self.chart.stacking == XuniStackingStacked100pc && self.chart.rotated == true) { + self.chart.axisX.format = @"D"; + self.chart.axisY.format = @"F2"; } else { - chart.axisX.format = @"D"; - chart.axisY.format = @"D"; + self.chart.axisX.format = @"D"; + self.chart.axisY.format = @"D"; } } else { - if (chart.stacking == XuniStackingStacked100pc && chart.rotated == false) { - chart.axisX.format = @"D"; - chart.axisY.format = @"F2"; + if (self.chart.stacking == XuniStackingStacked100pc && self.chart.rotated == false) { + self.chart.axisX.format = @"D"; + self.chart.axisY.format = @"F2"; } - else if (chart.stacking == XuniStackingStacked100pc && chart.rotated == true) { - chart.axisX.format = @"F2"; - chart.axisY.format = @"F2"; + else if (self.chart.stacking == XuniStackingStacked100pc && self.chart.rotated == true) { + self.chart.axisX.format = @"F2"; + self.chart.axisY.format = @"F2"; } else { - chart.axisX.format = @"D"; - chart.axisY.format = @"D"; + self.chart.axisX.format = @"D"; + self.chart.axisY.format = @"D"; } } } - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { - if(pickerView.tag == 2) + if(component == 0) { return [chartTypePickerData objectAtIndex:row]; } - else if(pickerView.tag == 3){ + else if(component == 1){ return [stackingPickerData objectAtIndex:row]; } else{ @@ -196,29 +174,4 @@ - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row fo } } -- (void)switchChanged:(UISwitch *) switchState { - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; - NSString *temp = [[NSString alloc] init]; - if ([switchState isOn]) { - chart.rotated = true; - } - else - { - chart.rotated = false; - } - temp = chart.axisX.format; - chart.axisX.format = chart.axisY.format; - chart.axisY.format = temp; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/BubbleChartController.m b/ObjectiveC/FlexChart101/FlexChart101/BubbleChartController.m index 23acbbc..55c89f6 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/BubbleChartController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/BubbleChartController.m @@ -7,9 +7,10 @@ #import "BubbleChartController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface BubbleChartController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,45 +18,20 @@ @implementation BubbleChartController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Bubble Chart", nil)]; - - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; - NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, downloads" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, downloads" name:@"Expenses"]; - - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - chart.chartType = XuniChartTypeBubble; - chart.itemsSource = chartData; - chart.loadAnimation.animationMode = XuniAnimationModeSeries; - - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. + NSMutableArray *chartData = [ChartData demoData]; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, downloads" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, downloads" name:@"Expenses"]; + + [ self.chart.series addObject:sales]; + [ self.chart.series addObject:expenses]; + self.chart.chartType = XuniChartTypeBubble; + self.chart.itemsSource = chartData; + self.chart.loadAnimation.animationMode = XuniAnimationModeSeries; + + self.chart.tag = 1; + [self.view addSubview:self.chart]; } -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ChartAnnotationsController.m b/ObjectiveC/FlexChart101/FlexChart101/ChartAnnotationsController.m index 909da38..a6dd4ed 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ChartAnnotationsController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ChartAnnotationsController.m @@ -8,9 +8,10 @@ #import "ChartAnnotationsController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface ChartAnnotationsController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -18,20 +19,15 @@ @implementation ChartAnnotationsController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:@"Annotations"]; - - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; + NSMutableArray *chartData = [ChartData annotationData]; - chart.bindingX = @"name"; - chart.chartType = XuniChartTypeLine; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - [chart.series addObject:sales]; - chart.itemsSource = chartData; - [self addAnnotations:chart]; + self.chart.bindingX = @"name"; + self.chart.chartType = XuniChartTypeLine; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + [self.chart.series addObject:sales]; + self.chart.itemsSource = chartData; + [self addAnnotations:self.chart]; - chart.tag = 1; - [self.view addSubview:chart]; } - (void)addAnnotations:(FlexChart *)chart { @@ -127,26 +123,6 @@ - (void)addAnnotations:(FlexChart *)chart { } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ChartData.h b/ObjectiveC/FlexChart101/FlexChart101/ChartData.h index b02f7ea..eef855b 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ChartData.h +++ b/ObjectiveC/FlexChart101/FlexChart101/ChartData.h @@ -31,4 +31,6 @@ + (NSMutableArray *)generateRandomPoints:(NSInteger)count; ++ (NSMutableArray *)generateRandomData:(NSInteger)count; + @end \ No newline at end of file diff --git a/ObjectiveC/FlexChart101/FlexChart101/ChartData.m b/ObjectiveC/FlexChart101/FlexChart101/ChartData.m index 4b26e47..0a85406 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ChartData.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ChartData.m @@ -18,7 +18,7 @@ - (id)initWithName:(NSString *)name sales:(NSNumber *)sales expenses:(NSNumber * _downloads = downloads; } return self; -} +} + (NSNumber *)generateRandom:(NSInteger) max { return [NSNumber numberWithUnsignedInteger:(arc4random() % max)]; } @@ -92,4 +92,16 @@ + (NSMutableArray *)generateRandomPoints:(NSInteger)count { return points; } ++ (NSMutableArray *)generateRandomData:(NSInteger)count { + NSMutableArray *points = [[NSMutableArray alloc] init]; + + for (int i = 0; i < count ; i++) { + double random = arc4random()%10000 + 100; + [points addObject:[[ChartPoint alloc] initWithX:[NSNumber numberWithInt:i*10] + y:[NSNumber numberWithDouble:random]]]; + } + + return points; +} + @end \ No newline at end of file diff --git a/ObjectiveC/FlexChart101/FlexChart101/ConditionalFormattingController.m b/ObjectiveC/FlexChart101/FlexChart101/ConditionalFormattingController.m index 7ec1854..7110e4b 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ConditionalFormattingController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ConditionalFormattingController.m @@ -7,9 +7,10 @@ #import "ConditionalFormattingController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface ConditionalFormattingController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,24 +18,20 @@ @implementation ConditionalFormattingController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Conditional Formatting", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; - XuniSeries *sine = [[XuniSeries alloc] initForChart:chart binding:@"y" name:@"sine"]; + XuniSeries *sine = [[XuniSeries alloc] initForChart:self.chart binding:@"y" name:@"sine"]; sine.bindingX = @"x"; - [chart.series addObject:sine]; + [self.chart.series addObject:sine]; - chart.chartType = XuniChartTypeLineSymbols; - chart.bindingX = @"x"; - chart.itemsSource = [self getData]; - chart.loadAnimation.animationMode = XuniAnimationModePoint; - chart.axisY.format = @"F1"; - chart.axisX.format = @"F1"; + self.chart.chartType = XuniChartTypeLineSymbols; + self.chart.bindingX = @"x"; + self.chart.itemsSource = [self getData]; + self.chart.loadAnimation.animationMode = XuniAnimationModePoint; + self.chart.axisY.format = @"F1"; + self.chart.axisX.format = @"F1"; - IXuniEventHandler plotElementLoadingHandler = ^(NSObject *sender, XuniEventArgs *args) - { - XuniChartPlotElementEventArgs *plotArgs = (XuniChartPlotElementEventArgs*)args; + [self.chart.plotElementLoading addHandler: ^(XuniEventContainer *eventContainer) { + XuniChartPlotElementEventArgs *plotArgs = eventContainer.eventArgs; if (plotArgs.dataPoint != nil && plotArgs.defaultRender != nil) { double y = plotArgs.dataPoint.value; @@ -47,11 +44,8 @@ - (void)viewDidLoad { [plotArgs.renderEngine setFill:[UIColor colorWithRed:r green:g blue:b alpha:a]]; [plotArgs.defaultRender execute:nil]; } - }; - [chart.plotElementLoading addHandler:plotElementLoadingHandler forObject:self]; + } forObject:self]; - chart.tag = 1; - [self.view addSubview:chart]; } - (NSMutableArray*)getData { @@ -64,26 +58,4 @@ - (NSMutableArray*)getData { return array; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/CustomPlotElementsController.m b/ObjectiveC/FlexChart101/FlexChart101/CustomPlotElementsController.m index 896f945..57cef56 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/CustomPlotElementsController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/CustomPlotElementsController.m @@ -7,10 +7,10 @@ #import "CustomPlotElementsController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; -@interface CustomPlotElementsController () { -} +@interface CustomPlotElementsController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -18,10 +18,8 @@ @implementation CustomPlotElementsController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Custom Plot Elements", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *devicesSold = [[XuniSeries alloc] initForChart:chart binding:@"devicesSold" name:@"Devices sold"]; [chart.series addObject:devicesSold]; @@ -36,9 +34,8 @@ - (void)viewDidLoad { chart.axisX.majorTickWidth = 0; chart.axisX.minorTickWidth = 1; - IXuniEventHandler plotElementLoadingHandler = ^(NSObject *sender, XuniEventArgs *args) - { - XuniChartPlotElementEventArgs *plotArgs = (XuniChartPlotElementEventArgs*)args; + [chart.plotElementLoading addHandler: ^(XuniEventContainer *eventContainer) { + XuniChartPlotElementEventArgs *plotArgs = eventContainer.eventArgs; if (plotArgs.renderEngine != nil && plotArgs.hitTestInfo != nil && plotArgs.defaultRender != nil) { [plotArgs.renderEngine setFill:[UIColor grayColor]]; [plotArgs.defaultRender execute:nil]; @@ -51,34 +48,9 @@ - (void)viewDidLoad { [customPoint.logo drawInRect:rect]; } } - }; - [chart.plotElementLoading addHandler:plotElementLoadingHandler forObject:self]; - - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + } forObject:self]; } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.h b/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.h index 5ec06cb..e4cbe94 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.h @@ -6,7 +6,7 @@ // #import -#import +@import XuniChartCoreDynamicKit; @interface CustomTooltipsController : UIViewController diff --git a/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.m b/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.m index d506aaa..a98f38c 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/CustomTooltipsController.m @@ -6,69 +6,44 @@ // #import "CustomTooltipsController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" -#import "XuniChartCoreKit/XuniChartCoreKit.h" +@import XuniFlexChartDynamicKit; +@import XuniChartCoreDynamicKit; #import "ChartData.h" @interface CustomTooltipsController (){ MyTooltip *t; } +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation CustomTooltipsController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Custom Tooltips", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart:self.chart binding:@"downloads, downloads" name:@"Downloads"]; - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; - chart.itemsSource = chartData; - chart.stacking = XuniStackingStacked; - chart.palette = [XuniPalettes zen]; - chart.loadAnimation.animationMode = XuniAnimationModeSeries; - chart.axisY.axisLineVisible = NO; - chart.axisY.majorUnit = 2000; + self.chart.itemsSource = chartData; + self.chart.stacking = XuniStackingStacked; + self.chart.palette = [XuniPalettes zen]; + self.chart.loadAnimation.animationMode = XuniAnimationModeSeries; + self.chart.axisY.axisLineVisible = NO; + self.chart.axisY.majorUnit = 2000; t = [[MyTooltip alloc] init]; t.backgroundColor = [UIColor colorWithRed:1 green:1 blue:0.792 alpha:1]; - chart.tooltip.content = t; + self.chart.tooltip.content = t; - chart.tag = 1; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} -/* - #pragma mark - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - } - */ - @end @interface MyTooltip (){ diff --git a/ObjectiveC/FlexChart101/FlexChart101/CustomizingAxesController.m b/ObjectiveC/FlexChart101/FlexChart101/CustomizingAxesController.m index b7cb543..bdd37ed 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/CustomizingAxesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/CustomizingAxesController.m @@ -6,10 +6,11 @@ // #import "CustomizingAxesController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface CustomizingAxesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,49 +18,45 @@ @implementation CustomizingAxesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Customizing Axes", nil)]; - // Do any additional setup after loading the view. NSNumber *max = [[NSNumber alloc] initWithInt:10000]; - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart: self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart: self.chart binding:@"expenses, expenses" name:@"Expenses"]; - [chart.series addObject:sales]; - [chart.series addObject:expenses]; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; - chart.itemsSource = chartData; - chart.axisX.title = @"Country"; - chart.axisX.lineWidth = 2; - chart.axisX.minorTickWidth = 1; - chart.axisX.majorTickWidth = 0; - chart.axisY.lineWidth = 2; - chart.axisY.minorGridVisible = YES; - chart.axisY.minorGridWidth = 0.5; - chart.axisY.minorGridDashes = [[NSArray alloc] initWithObjects:@4, @4, nil]; - chart.axisY.minorTickWidth = 1; - chart.axisY.majorTickWidth = 2; - chart.axisY.majorGridWidth = 1; - chart.axisY.majorGridColor = [UIColor colorWithWhite:0.8 alpha:1]; - chart.axisY.majorGridFill = [UIColor colorWithWhite:0.6 alpha:0.2]; - chart.axisY.majorUnit = 1000; - chart.axisY.max = max; + self.chart.itemsSource = chartData; + self.chart.axisX.title = @"Country"; + self.chart.axisX.lineWidth = 2; + self.chart.axisX.minorTickWidth = 1; + self.chart.axisX.majorTickWidth = 0; + self.chart.axisY.lineWidth = 2; + self.chart.axisY.minorGridVisible = YES; + self.chart.axisY.minorGridWidth = 0.5; + self.chart.axisY.minorGridDashes = [[NSArray alloc] initWithObjects:@4, @4, nil]; + self.chart.axisY.minorTickWidth = 1; + self.chart.axisY.majorTickWidth = 2; + self.chart.axisY.majorGridWidth = 1; + self.chart.axisY.majorGridColor = [UIColor colorWithWhite:0.8 alpha:1]; + self.chart.axisY.majorGridFill = [UIColor colorWithWhite:0.6 alpha:0.2]; + self.chart.axisY.majorUnit = 1000; + self.chart.axisY.max = max; - IXuniEventHandler axisXLabelLoadingHandler = ^(NSObject *sender, XuniEventArgs *args) { - XuniLabelLoadingEventArgs *labelArgs = (XuniLabelLoadingEventArgs*)args; + [self.chart.axisX.labelLoading addHandler: ^(XuniEventContainer *eventContainer) { + XuniLabelLoadingEventArgs *labelArgs = eventContainer.eventArgs; labelArgs.label = nil; NSNumber *countryNum = [NSNumber numberWithDouble:labelArgs.value]; UIImage *image = [UIImage imageNamed:[countryNum stringValue]]; CGRect rect = CGRectMake(labelArgs.region.left, labelArgs.region.top, labelArgs.region.width, labelArgs.region.height); [image drawInRect:rect]; - }; - [chart.axisX.labelLoading addHandler:axisXLabelLoadingHandler forObject:self]; + } forObject:self]; - IXuniEventHandler axisYLabelLoadingHandler = ^(NSObject *sender, XuniEventArgs *args) { - XuniLabelLoadingEventArgs *labelArgs = (XuniLabelLoadingEventArgs*)args; + [self.chart.axisY.labelLoading addHandler: ^(XuniEventContainer *eventContainer) { + XuniLabelLoadingEventArgs *labelArgs = eventContainer.eventArgs; if (labelArgs.value <= 3000) { [labelArgs.renderEngine setTextFill:[UIColor redColor]]; } @@ -70,34 +67,8 @@ - (void)viewDidLoad { [labelArgs.renderEngine setTextFill:[UIColor blackColor]]; } labelArgs.label = [NSString stringWithFormat:@"$%dK", (int)(labelArgs.value / 1000)]; - - }; - [chart.axisY.labelLoading addHandler:axisYLabelLoadingHandler forObject:self]; - - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + } forObject:self]; } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.h b/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.h index 19f0052..2c2abfa 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.h @@ -7,6 +7,6 @@ #import -@interface DataLabelController : UIViewController +@interface DataLabelController : UIViewController @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.m b/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.m index d2599d4..50f452a 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/DataLabelController.m @@ -7,139 +7,70 @@ #import "DataLabelController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; -@interface DataLabelController (){ - NSMutableArray *positionPickerData; -} +@interface DataLabelController () +@property (weak, nonatomic) IBOutlet UISegmentedControl *modeSelector; +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation DataLabelController +- (IBAction)modeChanged:(id)sender { + int row = self.modeSelector.selectedSegmentIndex; + if (row == 0) { + self.chart.dataLabel.position = FlexChartDataLabelPositionNone; + } + else if (row == 1){ + self.chart.dataLabel.position = FlexChartDataLabelPositionLeft; + } + else if (row == 2){ + self.chart.dataLabel.position = FlexChartDataLabelPositionTop; + } + else if (row == 3){ + self.chart.dataLabel.position = FlexChartDataLabelPositionRight; + } + else if (row == 4){ + self.chart.dataLabel.position = FlexChartDataLabelPositionBottom; + } + else if (row == 5){ + self.chart.dataLabel.position = FlexChartDataLabelPositionCenter; + } +} + - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Data Labels", nil)]; - - // Do any additional setup after loading the view. - positionPickerData = [[NSMutableArray alloc]initWithObjects:@"None", @"Left", @"Top", @"Right", @"Bottom", @"Center", nil]; - UIPickerView *positionPicker = [[UIPickerView alloc] init]; - positionPicker.delegate = self; - positionPicker.showsSelectionIndicator = YES; - positionPicker.hidden = NO; - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses" name:@"Total Expenses"]; - [chart.series addObject:expenses]; - - chart.itemsSource = chartData; - chart.chartType = XuniChartTypeBar; - chart.isAnimated = NO; - chart.tooltip.isVisible = NO; - chart.axisX.majorGridVisible = YES; - chart.axisY.labelsVisible = NO; - chart.axisY.majorGridVisible = NO; - chart.axisY.minorGridVisible = NO; - chart.axisY.majorTickWidth = 0; - chart.palette = [XuniPalettes organic]; - - chart.dataLabel.content= @"{x} {y}"; - chart.dataLabel.dataLabelFormat = @"F2"; - chart.dataLabel.position = FlexChartDataLabelPositionLeft; - chart.dataLabel.dataLabelFontColor = [UIColor redColor]; - chart.dataLabel.dataLabelBackgroundColor = [UIColor whiteColor]; - chart.dataLabel.dataLabelBorderColor = [UIColor blueColor]; - chart.dataLabel.dataLabelBorderWidth = 1; - chart.dataLabel.dataLabelFont = [UIFont systemFontOfSize:15]; - - chart.tag = 1; - positionPicker.tag = 2; - - [self.view addSubview:positionPicker]; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; + self.chart.bindingX = @"name"; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses" name:@"Total Expenses"]; + [self.chart.series addObject:expenses]; - UIPickerView *positionPicker = (UIPickerView*)[self.view viewWithTag:2]; - [positionPicker selectRow:1 inComponent:0 animated:NO]; -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *positionPicker = (UIPickerView*)[self.view viewWithTag:2]; - positionPicker.frame = CGRectMake(0, 44, self.view.bounds.size.width, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ + self.chart.itemsSource = chartData; + self.chart.chartType = XuniChartTypeBar; + self.chart.isAnimated = NO; + self.chart.tooltip.isVisible = NO; + self.chart.axisX.majorGridVisible = YES; + self.chart.axisY.labelsVisible = NO; + self.chart.axisY.majorGridVisible = NO; + self.chart.axisY.minorGridVisible = NO; + self.chart.axisY.majorTickWidth = 0; + self.chart.palette = [XuniPalettes organic]; - if(pickerView.tag == 2){ - return [positionPickerData count]; - } + self.chart.dataLabel.content= @"{x} {y}"; + self.chart.dataLabel.dataLabelFormat = @"F2"; + self.chart.dataLabel.position = FlexChartDataLabelPositionLeft; + self.chart.dataLabel.dataLabelFontColor = [UIColor redColor]; + self.chart.dataLabel.dataLabelBackgroundColor = [UIColor whiteColor]; + self.chart.dataLabel.dataLabelBorderColor = [UIColor blueColor]; + self.chart.dataLabel.dataLabelBorderWidth = 1; + self.chart.dataLabel.dataLabelFont = [UIFont systemFontOfSize:15]; - return 0; -} - -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; - if(pickerView.tag == 2) - { - if (row == 0) { - chart.dataLabel.position = FlexChartDataLabelPositionNone; - } - else if (row == 1){ - chart.dataLabel.position = FlexChartDataLabelPositionLeft; - } - else if (row == 2){ - chart.dataLabel.position = FlexChartDataLabelPositionTop; - } - else if (row == 3){ - chart.dataLabel.position = FlexChartDataLabelPositionRight; - } - else if (row == 4){ - chart.dataLabel.position = FlexChartDataLabelPositionBottom; - } - else if (row == 5){ - chart.dataLabel.position = FlexChartDataLabelPositionCenter; - } - } -} - -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - if(pickerView.tag == 2) - { - return [positionPickerData objectAtIndex:row]; - } - else{ - return @"error"; - } + _modeSelector.selectedSegmentIndex = 1; } -/* - #pragma mark - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - } - */ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/DynamicChartsController.m b/ObjectiveC/FlexChart101/FlexChart101/DynamicChartsController.m index 59c100f..58ed4b5 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/DynamicChartsController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/DynamicChartsController.m @@ -7,12 +7,13 @@ #import "DynamicChartsController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "DynamicChartData.h" @interface DynamicChartsController (){ NSMutableArray *chartData; } +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -20,10 +21,8 @@ @implementation DynamicChartsController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Dynamic Charts", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; chartData = [DynamicChartData demoData]; chart.bindingX = @"time"; XuniSeries *trucks = [[XuniSeries alloc] initForChart:chart binding:@"trucks, trucks" name:@"Trucks"]; @@ -39,6 +38,8 @@ - (void)viewDidLoad { chart.palette = [XuniPalettes coral]; chart.tooltip.isVisible = false; + chart.loadAnimation.animationMode = XuniAnimationModePoint; + NSDate *d = [NSDate dateWithTimeIntervalSinceNow: chart.loadAnimation.duration + 0.1]; NSTimer *timer = [[NSTimer alloc] initWithFireDate:d interval:1 @@ -49,35 +50,12 @@ - (void)viewDidLoad { NSRunLoop *runner = [NSRunLoop currentRunLoop]; [runner addTimer:timer forMode: NSDefaultRunLoopMode]; - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; } -(void)onTick{ - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; + FlexChart *chart = self.chart; chart.isAnimated = NO; chart.itemsSource = [DynamicChartData dynamicData:chartData]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.h b/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.h index a2700fb..c111774 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.h @@ -7,6 +7,6 @@ #import -@interface FinancialChartController : UIViewController +@interface FinancialChartController : UIViewController @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.m b/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.m index 3163f7c..32055ea 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/FinancialChartController.m @@ -6,96 +6,46 @@ // #import "FinancialChartController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "FinancialData.h" -@interface FinancialChartController (){ - NSMutableArray *pickerData; -} +@interface FinancialChartController () +@property (weak, nonatomic) IBOutlet UISegmentedControl *switcher; +@property (weak, nonatomic) IBOutlet FlexChart *chart; + @end @implementation FinancialChartController - -- (void)viewDidLoad { - [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Financial Chart", nil)]; - - // Do any additional setup after loading the view. - UIPickerView *pickerView; - pickerData =[[NSMutableArray alloc] initWithObjects:@"Candlestick", @"HLOC", nil]; - - pickerView = [[UIPickerView alloc] init]; - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; - FlexChart *chart = [[FlexChart alloc] init]; - NSMutableArray *financialData = [FinancialData demoData]; - chart.bindingX = @"date"; - XuniSeries *finance = [[XuniSeries alloc] initForChart:chart binding: @"high,low,open,close" name: @"AAPL"]; - - [chart.series addObject:finance]; - chart.itemsSource = financialData; - chart.chartType = XuniChartTypeCandlestick; - chart.selectionMode = XuniSelectionModePoint; - chart.axisY.majorGridFill = [UIColor colorWithWhite:0.6 alpha:0.2]; - chart.legend.position = XuniChartLegendPositionNone; - - chart.tag = 1; - pickerView.tag = 2; - - [self.view addSubview:chart]; - [self.view addSubview:pickerView]; - -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:2]; - pickerView.frame = CGRectMake(self.view.bounds.size.width/4, 44, self.view.bounds.size.width/2, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - return [pickerData count]; -} - -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - - switch (row) { +- (IBAction)modeSwitched:(id)sender { + switch (self.switcher.selectedSegmentIndex) { case 0: - chart.chartType = XuniChartTypeCandlestick; + self.chart.chartType = XuniChartTypeCandlestick; break; case 1: - chart.chartType = XuniChartTypeHighLowOpenClose; + self.chart.chartType = XuniChartTypeHighLowOpenClose; break; default: break; } -} -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - return [pickerData objectAtIndex:row]; } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +- (void)viewDidLoad { + [super viewDidLoad]; + + NSMutableArray *financialData = [FinancialData demoData]; + self.chart.bindingX = @"date"; + XuniSeries *finance = [[XuniSeries alloc] initForChart:self.chart binding: @"high,low,open,close" name: @"AAPL"]; + + [self.chart.series addObject:finance]; + self.chart.itemsSource = financialData; + self.chart.chartType = XuniChartTypeCandlestick; + self.chart.selectionMode = XuniSelectionModePoint; + self.chart.axisY.majorGridFill = [UIColor colorWithWhite:0.6 alpha:0.2]; + self.chart.legend.position = XuniChartLegendPositionNone; + } -*/ + + @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/GettingStartedController.m b/ObjectiveC/FlexChart101/FlexChart101/GettingStartedController.m index cbe18c8..b1cfe73 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/GettingStartedController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/GettingStartedController.m @@ -8,9 +8,10 @@ #import "GettingStartedController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface GettingStartedController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -18,45 +19,18 @@ @implementation GettingStartedController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Getting Started", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; - - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; - chart.itemsSource = chartData; - - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart:self.chart binding:@"downloads, downloads" name:@"Downloads"]; + + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; + self.chart.itemsSource = chartData; } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/HitTestController.h b/ObjectiveC/FlexChart101/FlexChart101/HitTestController.h index b891291..d7691f5 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/HitTestController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/HitTestController.h @@ -6,7 +6,7 @@ // #import -#import +@import XuniFlexChartDynamicKit; @interface HitTestController : UIViewController diff --git a/ObjectiveC/FlexChart101/FlexChart101/HitTestController.m b/ObjectiveC/FlexChart101/FlexChart101/HitTestController.m index 6998ed1..c59b631 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/HitTestController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/HitTestController.m @@ -7,9 +7,14 @@ #import "HitTestController.h" #import "HitTestData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface HitTestController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; +@property (weak, nonatomic) IBOutlet UILabel *chartElementLabel; +@property (weak, nonatomic) IBOutlet UILabel *seriesLabel; +@property (weak, nonatomic) IBOutlet UILabel *pointIndexLabel; +@property (weak, nonatomic) IBOutlet UILabel *xyValuesLabel; @end @@ -17,20 +22,9 @@ @implementation HitTestController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Hit Test", nil)]; - // Do any additional setup after loading the view. - UILabel *chartElementlabel = [[UILabel alloc] init]; - chartElementlabel.text = @" Chart element"; - UILabel *seriesLabel = [[UILabel alloc] init]; - seriesLabel.text = @" Series"; - UILabel *pointIndexlabel = [[UILabel alloc] init]; - pointIndexlabel.text = @" Point Index"; - UILabel *xyLabel = [[UILabel alloc] init]; - xyLabel.text = @" X Y Values"; - - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; chart.bindingX = @"x"; XuniSeries *seriesCosX = [[XuniSeries alloc] initForChart:chart binding:@"y, y" name:@"cos(x)"]; XuniSeries *seriesSinX = [[XuniSeries alloc] initForChart:chart binding:@"y, y" name:@"sin(x)"]; @@ -45,48 +39,18 @@ - (void)viewDidLoad { chart.axisY.format = @"F"; chart.header = @"Trigonometric Functions"; chart.footer = @"Cartesian coordinates"; - - chart.tag = 1; - seriesLabel.tag = 2; - pointIndexlabel.tag = 3; - xyLabel.tag = 4; - chartElementlabel.tag = 5; - - [self.view addSubview:chartElementlabel]; - [self.view addSubview:chart]; - [self.view addSubview:pointIndexlabel]; - [self.view addSubview:seriesLabel]; - [self.view addSubview:xyLabel]; -} -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } --(void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UILabel *seriesLabel = (UILabel *)[self.view viewWithTag:2]; - UILabel *pointIndexLabel = (UILabel *)[self.view viewWithTag:3]; - UILabel *xyLabel = (UILabel *)[self.view viewWithTag:4]; - UILabel *chartElementLabel = (UILabel *)[self.view viewWithTag:5]; - chart.frame = CGRectMake(0, self.view.bounds.size.height/8, self.view.bounds.size.width, self.view.bounds.size.height*5/8); - seriesLabel.frame = CGRectMake(0, self.view.bounds.size.height*13/16, self.view.bounds.size.width, self.view.bounds.size.height/16); - pointIndexLabel.frame = CGRectMake(0, self.view.bounds.size.height *14/16, self.view.bounds.size.width, self.view.bounds.size.height/16); - xyLabel.frame = CGRectMake(0, self.view.bounds.size.height *15/16, self.view.bounds.size.width, self.view.bounds.size.height/16); - chartElementLabel.frame = CGRectMake(0, self.view.bounds.size.height*6/8, self.view.bounds.size.width, self.view.bounds.size.height/16); - [chart setNeedsDisplay]; -} -(BOOL)tapped:(FlexChartBase *)sender point:(XuniPoint *)point { - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UILabel *s = (UILabel *)[self.view viewWithTag:2]; - UILabel *pi = (UILabel *)[self.view viewWithTag:3]; - UILabel *xy = (UILabel *)[self.view viewWithTag:4]; - UILabel *ce = (UILabel *)[self.view viewWithTag:5]; + FlexChart *chart = self.chart; + UILabel *s = self.seriesLabel; + UILabel *pi = self.pointIndexLabel; + UILabel *xy = self.xyValuesLabel; + UILabel *ce = self.chartElementLabel; XuniChartHitTestInfo *hitTest = [chart hitTest:point]; pi.text = [@" Point Index: " stringByAppendingString: [NSString stringWithFormat:@"%i", hitTest.dataPoint.pointIndex]]; xy.text = [[NSString stringWithFormat:@" X:%@", hitTest.dataPoint.valueX] stringByAppendingString: [NSString stringWithFormat:@" Y:%1.2f", hitTest.dataPoint.value]]; @@ -135,13 +99,4 @@ -(NSString *)getChartTypeString: (XuniChartElement) chartElement { } - -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} - @end \ No newline at end of file diff --git a/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json b/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json new file mode 100644 index 0000000..05e7047 --- /dev/null +++ b/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "chart_line.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png b/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png new file mode 100644 index 0000000..8a848e7 Binary files /dev/null and b/ObjectiveC/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png differ diff --git a/ObjectiveC/FlexChart101/FlexChart101/LegendAndTitlesController.m b/ObjectiveC/FlexChart101/FlexChart101/LegendAndTitlesController.m index 28a0d4a..413e704 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/LegendAndTitlesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/LegendAndTitlesController.m @@ -7,9 +7,10 @@ #import "LegendAndTitlesController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface LegendAndTitlesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,65 +18,37 @@ @implementation LegendAndTitlesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Legend and Titles", nil)]; - // Do any additional setup after loading the view. - - FlexChart *chart = [[FlexChart alloc] init]; - NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; + NSMutableArray *chartData = [ChartData demoData]; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart:self.chart binding:@"downloads, downloads" name:@"Downloads"]; - chart.itemsSource = chartData; - chart.chartType = XuniChartTypeScatter; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; - chart.header = @"Sample Chart"; - chart.headerTextColor = [UIColor colorWithRed:0.502 green:0.016 blue:0.302 alpha:1]; - chart.headerFont = [UIFont boldSystemFontOfSize:24.0f]; - chart.headerTextAlignment = XuniHorizontalAlignmentCenter; - chart.footer = @"2015 GrapeCity, Inc."; - chart.footerTextColor = [UIColor colorWithRed:0.502 green:0.016 blue:0.302 alpha:1]; - chart.footerFont = [UIFont systemFontOfSize:16.0f]; - chart.footerTextAlignment = XuniHorizontalAlignmentCenter; + self.chart.itemsSource = chartData; + self.chart.chartType = XuniChartTypeScatter; - chart.axisX.title = @"Country"; - chart.axisX.titleFont = [UIFont boldSystemFontOfSize:16.0f]; - chart.axisX.titleFont = [UIFont italicSystemFontOfSize:16.0f]; - chart.axisX.majorGridVisible = YES; - chart.axisY.title = @"Amount"; - chart.axisY.titleFont = [UIFont boldSystemFontOfSize:16.0f]; - chart.axisY.titleFont = [UIFont italicSystemFontOfSize:16.0f]; - chart.axisY.format = @"C0"; + self.chart.header = @"Sample Chart"; + self.chart.headerTextColor = [UIColor colorWithRed:0.502 green:0.016 blue:0.302 alpha:1]; + self.chart.headerFont = [UIFont boldSystemFontOfSize:24.0f]; + self.chart.headerTextAlignment = XuniHorizontalAlignmentCenter; + self.chart.footer = @"2015 GrapeCity, Inc."; + self.chart.footerTextColor = [UIColor colorWithRed:0.502 green:0.016 blue:0.302 alpha:1]; + self.chart.footerFont = [UIFont systemFontOfSize:16.0f]; + self.chart.footerTextAlignment = XuniHorizontalAlignmentCenter; - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. + self.chart.axisX.title = @"Country"; + self.chart.axisX.titleFont = [UIFont boldSystemFontOfSize:16.0f]; + self.chart.axisX.titleFont = [UIFont italicSystemFontOfSize:16.0f]; + self.chart.axisX.majorGridVisible = YES; + self.chart.axisY.title = @"Amount"; + self.chart.axisY.titleFont = [UIFont boldSystemFontOfSize:16.0f]; + self.chart.axisY.titleFont = [UIFont italicSystemFontOfSize:16.0f]; + self.chart.axisY.format = @"C0"; } -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.h b/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.h index 184eace..e52fb86 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.h @@ -6,9 +6,9 @@ // #import -#import +@import XuniFlexChartDynamicKit; -@interface LineMarkerController : UIViewController +@interface LineMarkerController : UIViewController @end @interface MyMarkerView : XuniChartMarkerBaseView diff --git a/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.m b/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.m index 4a00de0..29e5825 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/LineMarkerController.m @@ -7,127 +7,87 @@ #import "LineMarkerController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; -@interface LineMarkerController (){ - NSMutableArray *interactionPickerData; - NSMutableArray *verticalPositionPickerData; -} +@interface LineMarkerController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; +@property (weak, nonatomic) IBOutlet UISlider *positionSelect; +@property (weak, nonatomic) IBOutlet UISegmentedControl *modeSelect; @end @implementation LineMarkerController +- (IBAction)modeSelected:(id)sender { + int row = _modeSelect.selectedSegmentIndex; + if (row == 0) { + self.chart.lineMarker.interaction = XuniChartMarkerInteractionNone; + } + else if (row == 1){ + self.chart.lineMarker.interaction = XuniChartMarkerInteractionMove; + } + else if (row == 2){ + self.chart.lineMarker.interaction = XuniChartMarkerInteractionDrag; + } +} + +- (IBAction)positionChanged:(id)sender { + double pos = self.positionSelect.value; + if(pos == 0) pos = NAN; + self.chart.lineMarker.verticalPosition = pos; +} - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Line Marker", nil)]; - - // Do any additional setup after loading the view. - interactionPickerData = [[NSMutableArray alloc] initWithObjects: @"None", @"Move", @"Drag", nil]; - verticalPositionPickerData = [[NSMutableArray alloc] initWithObjects: @"NaN", @"0", @"0.25", @"0.5", @"0.75", @"1", nil]; - - UIPickerView *interactionPicker = [[UIPickerView alloc] init]; - interactionPicker.delegate = self; - - UIPickerView *verticalPositionPicker = [[UIPickerView alloc] init]; - verticalPositionPicker.delegate = self; + [self setTitle:@"Line Marker"]; - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; + self.chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart:self.chart binding:@"downloads, downloads" name:@"Downloads"]; - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; - chart.itemsSource = chartData; - chart.chartType = XuniChartTypeBar; + self.chart.itemsSource = chartData; + self.chart.chartType = XuniChartTypeLine; // Implement Chart Line Marker. - MyMarkerView *view = [[MyMarkerView alloc] initWithLineMarker:chart.lineMarker]; + MyMarkerView *view = [[MyMarkerView alloc] initWithLineMarker:self.chart.lineMarker]; view.markerRender = [[MyChartMarkerRender alloc] initWithView:view]; - chart.lineMarker.content = view; - chart.lineMarker.isVisible = YES; - chart.lineMarker.alignment = XuniChartMarkerAlignmentBottomRight; - chart.lineMarker.lines = XuniChartMarkerLinesVertical; - chart.lineMarker.interaction= XuniChartMarkerInteractionMove; - chart.lineMarker.dragContent = YES; - chart.lineMarker.seriesIndex = -1; - chart.lineMarker.verticalLineColor = [UIColor grayColor]; - chart.lineMarker.verticalPosition = 0; - [chart addSubview:view]; + self.chart.lineMarker.content = view; + self.chart.lineMarker.isVisible = YES; + self.chart.lineMarker.alignment = XuniChartMarkerAlignmentBottomRight; + self.chart.lineMarker.lines = XuniChartMarkerLinesVertical; + self.chart.lineMarker.interaction= XuniChartMarkerInteractionMove; + self.chart.lineMarker.dragContent = YES; + self.chart.lineMarker.seriesIndex = -1; + self.chart.lineMarker.verticalLineColor = [UIColor grayColor]; + self.chart.lineMarker.verticalPosition = 0; + [self.chart addSubview:view]; - chart.tag = 1; - interactionPicker.tag = 2; - verticalPositionPicker.tag = 3; - - [self.view addSubview:interactionPicker]; - [self.view addSubview:verticalPositionPicker]; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - UIPickerView *interactionPicker = (UIPickerView*)[self.view viewWithTag:2]; - [interactionPicker selectRow:1 inComponent:0 animated:NO]; + _modeSelect.selectedSegmentIndex = 1; + _positionSelect.value = 0.001; - UIPickerView *verticalPositionPicker = (UIPickerView*)[self.view viewWithTag:3]; - [verticalPositionPicker selectRow:1 inComponent:0 animated:NO]; + [self modeSelected:nil]; + [self positionChanged:nil]; } -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *interactionPicker = (UIPickerView*)[self.view viewWithTag:2]; - UIPickerView *verticalPositionPicker = (UIPickerView*)[self.view viewWithTag:3]; - CGFloat halfWidth = self.view.bounds.size.width / 2; - - interactionPicker.frame = CGRectMake(0, 30, halfWidth, 162); - verticalPositionPicker.frame = CGRectMake(halfWidth, 30, halfWidth, 162); - chart.frame = CGRectMake(0, 162, self.view.bounds.size.width, self.view.bounds.size.height - 162); - [chart setNeedsDisplay]; -} -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { - if(pickerView.tag == 2){ - return [interactionPickerData count]; - } - else if(pickerView.tag == 3){ - return [verticalPositionPickerData count]; - } - else { - return 0; - } -} - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; if(pickerView.tag == 2){ - if (row == 0) { - chart.lineMarker.interaction = XuniChartMarkerInteractionNone; - } - else if (row == 1){ - chart.lineMarker.interaction = XuniChartMarkerInteractionMove; - } - else if (row == 2){ - chart.lineMarker.interaction = XuniChartMarkerInteractionDrag; - } + } else if(pickerView.tag == 3){ if (row == 0) { @@ -151,27 +111,7 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } } -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { - if(pickerView.tag == 2){ - return [interactionPickerData objectAtIndex:row]; - } - else if(pickerView.tag == 3){ - return [verticalPositionPickerData objectAtIndex:row]; - } - else{ - return @"error"; - } -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/LoadAnimationController.m b/ObjectiveC/FlexChart101/FlexChart101/LoadAnimationController.m index ffc01b4..cd22824 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/LoadAnimationController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/LoadAnimationController.m @@ -6,13 +6,15 @@ // #import "LoadAnimationController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface LoadAnimationController () { NSMutableArray *chartTypePickerData; NSMutableArray *selectionModePickerData; } +@property (weak, nonatomic) IBOutlet UIPickerView *picker; +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -20,25 +22,13 @@ @implementation LoadAnimationController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Load Animation Mode", nil)]; - // Do any additional setup after loading the view. chartTypePickerData =[[NSMutableArray alloc] initWithObjects:@"Column", @"Area", @"Line", @"LineSymbols", @"Spline", @"SplineSymbols", @"SplineArea", @"Scatter", nil]; selectionModePickerData = [[NSMutableArray alloc]initWithObjects: @"All", @"Point", @"Series", nil]; - UIPickerView *chartTypePicker = [[UIPickerView alloc] init]; - chartTypePicker.delegate = self; - chartTypePicker.showsSelectionIndicator = YES; - chartTypePicker.hidden = false; - [chartTypePicker selectRow:0 inComponent:0 animated:false]; + self.picker.delegate = self; - UIPickerView *selectionModePicker = [[UIPickerView alloc] init]; - selectionModePicker.delegate = self; - selectionModePicker.showsSelectionIndicator = YES; - selectionModePicker.hidden = false; - [selectionModePicker selectRow:1 inComponent:0 animated:false]; - - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; NSMutableArray *chartData = [ChartData demoData]; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; @@ -53,39 +43,15 @@ - (void)viewDidLoad { chart.loadAnimation.animationMode = XuniAnimationModePoint; chart.palette = [XuniPalettes modern]; - chart.tag = 1; - chartTypePicker.tag = 2; - selectionModePicker.tag = 3; - - [self.view addSubview:chartTypePicker]; - [self.view addSubview:selectionModePicker]; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - UIPickerView *selectionModePicker = (UIPickerView*)[self.view viewWithTag:3]; - - chartTypePicker.frame = CGRectMake(0, 44, self.view.bounds.size.width / 2, 162); - selectionModePicker.frame = CGRectMake(self.view.bounds.size.width / 2, 44, self.view.bounds.size.width / 2, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { - return 1; + return 2; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { - - if (pickerView.tag == 2) { + if (component == 0) { return [chartTypePickerData count]; } else { @@ -94,9 +60,9 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; + FlexChart *chart = self.chart; - if (pickerView.tag == 2) { + if (component == 0) { if (row == 0) { chart.chartType = XuniChartTypeColumn; } @@ -122,7 +88,7 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp chart.chartType = XuniChartTypeScatter; } } - else if (pickerView.tag == 3) { + else { if (row == 0) { chart.loadAnimation.animationMode = XuniAnimationModeAll; @@ -139,24 +105,16 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - if (pickerView.tag == 2) { + if (component == 0) { return [chartTypePickerData objectAtIndex:row]; } - else if (pickerView.tag == 3) { + else if (component == 1) { return [selectionModePickerData objectAtIndex:row]; } else { return @"error"; } } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.h b/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.h new file mode 100644 index 0000000..118cca5 --- /dev/null +++ b/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.h @@ -0,0 +1,12 @@ +// +// MainMenuTableViewController.h +// FlexChart101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import + +@interface MainMenuTableViewController : UITableViewController + +@end diff --git a/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.m b/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.m new file mode 100644 index 0000000..56178eb --- /dev/null +++ b/ObjectiveC/FlexChart101/FlexChart101/MainMenuTableViewController.m @@ -0,0 +1,141 @@ +// +// MainMenuTableViewController.m +// FlexChart101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import "MainMenuTableViewController.h" + +@interface MainMenuTableViewController () + +@end + +@implementation MainMenuTableViewController +{ + NSArray *_samplesTitle; + NSArray *_samplesDescription; + NSArray *_samplesImage; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + _samplesTitle = @[NSLocalizedString(@"Getting Started", nil), + NSLocalizedString(@"Basic Chart Types", nil), + NSLocalizedString(@"Mixed Chart Types", nil), + NSLocalizedString(@"Financial Chart", nil), + NSLocalizedString(@"Bubble Chart", nil), + NSLocalizedString(@"Custom Tooltips", nil), + NSLocalizedString(@"Data Labels", nil), + NSLocalizedString(@"Annotations", nil), + NSLocalizedString(@"Line Marker", nil), + NSLocalizedString(@"Customizing Axes", nil), + NSLocalizedString(@"Multiple Axes", nil), + NSLocalizedString(@"Legend and Titles", nil), + NSLocalizedString(@"Conditional Formatting", nil), + NSLocalizedString(@"Custom Plot Elements", nil), + NSLocalizedString(@"Selection Modes", nil), + NSLocalizedString(@"Toggle Series", nil), + NSLocalizedString(@"Load Animation Mode", nil), + NSLocalizedString(@"Update Animation", nil), + NSLocalizedString(@"Dynamic Charts", nil), + NSLocalizedString(@"Hit Test", nil), + NSLocalizedString(@"Scrolling", nil), + NSLocalizedString(@"Zooming and Scrolling", nil), + NSLocalizedString(@"Theming", nil), + NSLocalizedString(@"Styling Series", nil), + NSLocalizedString(@"Export Image", nil)]; + + _samplesDescription = @[NSLocalizedString(@"Shows a simple chart with tooltips.", nil), + NSLocalizedString(@"Shows the basic chart types and stacking options.", nil), + NSLocalizedString(@"Shows a composite chart.", nil), + NSLocalizedString(@"Shows stock data in a candle chart.", nil), + NSLocalizedString(@"Shows a bubble chart.", nil), + NSLocalizedString(@"Shows a customized tooltip.", nil), + NSLocalizedString(@"Shows a simple chart with static data labels.", nil), + NSLocalizedString(@"Shows how to display annotations on FlexChart.", nil), + NSLocalizedString(@"Shows a moveable marker on top of the chart.", nil), + NSLocalizedString(@"Shows customized axis style and label format.", nil), + NSLocalizedString(@"Shows a chart with mutiple Y axes.", nil), + NSLocalizedString(@"Shows basic chart headers and axis titles.", nil), + NSLocalizedString(@"Shows conditional formatting by customizing plot elements.", nil), + NSLocalizedString(@"Shows how to fully customize plot elements.", nil), + NSLocalizedString(@"Shows the different selection modes.", nil), + NSLocalizedString(@"Shows the ability to toggle a series visibility.", nil), + NSLocalizedString(@"Shows animation modes when data is loaded.", nil), + NSLocalizedString(@"Shows animation when data is updated.", nil), + NSLocalizedString(@"Shows a dynamic, “live” chart.", nil), + NSLocalizedString(@"Demonstrates use of the FlexChart's hitTest method.", nil), + NSLocalizedString(@"Shows a chart with panning (or scrolling) along the axes.", nil), + NSLocalizedString(@"Shows stretch zoom-out and pinch zoom-in gestures.", nil), + NSLocalizedString(@"Shows the built-in palettes.", nil), + NSLocalizedString(@"Shows custom series styling.", nil), + NSLocalizedString(@"Shows how to export an image of FlexChart.", nil)]; + + _samplesImage = @[@"Getting Started", + @"Basic Chart Types", + @"Mixed Chart Types", + @"Financial Chart", + @"Bubble Chart", + @"Custom Tooltips", + @"Data Labels", + @"Annotations", + @"Line Marker", + @"Customizing Axes", + @"Multiple Axes", + @"Legend and Titles", + @"Conditional Formatting", + @"Custom Plot Elements", + @"Selection Modes", + @"Toggle Series", + @"Load Animation Mode", + @"Update Animation", + @"Dynamic Charts", + @"Hit Test", + @"Scrolling", + @"Zooming and Scrolling", + @"Theming", + @"Styling Series", + @"Export Image"]; + +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [_samplesTitle count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + NSString *SimpleIdentifier = @"SimpleIdentifier"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleIdentifier]; + NSString *imageName = [_samplesImage[indexPath.row] stringByReplacingOccurrencesOfString:@" " withString:@""]; + imageName = [NSString stringWithFormat:@"%@%@", imageName.lowercaseString, @".png"]; + + cell.textLabel.text = _samplesTitle[indexPath.row]; + cell.textLabel.textColor = [UIColor colorWithRed:176.0 / 255 green:15.0 / 255 blue:80.0 / 255 alpha:1]; + cell.detailTextLabel.text = _samplesDescription[indexPath.row]; + cell.detailTextLabel.textColor = [UIColor grayColor]; + cell.imageView.image = [UIImage imageNamed:imageName]; + + return cell; + +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + NSString* sampleName = [_samplesImage objectAtIndex:indexPath.row]; + + UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" + bundle:nil]; + UIViewController *sample = + [storyboard instantiateViewControllerWithIdentifier:sampleName]; + + [self.navigationController pushViewController:sample animated:true]; +} + + + +@end diff --git a/ObjectiveC/FlexChart101/FlexChart101/MixedChartTypesController.m b/ObjectiveC/FlexChart101/FlexChart101/MixedChartTypesController.m index bb0f9f5..fdc7813 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/MixedChartTypesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/MixedChartTypesController.m @@ -7,9 +7,10 @@ #import "MixedChartTypesController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface MixedChartTypesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,45 +18,21 @@ @implementation MixedChartTypesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Mixed Chart Types", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [ChartData demoData]; - chart.bindingX = @"name"; - XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; - XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; - XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; + self.chart.bindingX = @"name"; + XuniSeries *sales = [[XuniSeries alloc] initForChart:self.chart binding:@"sales, sales" name:@"Sales"]; + XuniSeries *expenses = [[XuniSeries alloc] initForChart:self.chart binding:@"expenses, expenses" name:@"Expenses"]; + XuniSeries *downloads = [[XuniSeries alloc] initForChart:self.chart binding:@"downloads, downloads" name:@"Downloads"]; downloads.chartType = XuniChartTypeLine; - [chart.series addObject:sales]; - [chart.series addObject:expenses]; - [chart.series addObject:downloads]; - chart.itemsSource = chartData; + [self.chart.series addObject:sales]; + [self.chart.series addObject:expenses]; + [self.chart.series addObject:downloads]; + self.chart.itemsSource = chartData; - chart.tag = 1; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/MultipleAxesController.m b/ObjectiveC/FlexChart101/FlexChart101/MultipleAxesController.m index a88db8c..94cd2ee 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/MultipleAxesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/MultipleAxesController.m @@ -6,10 +6,11 @@ // #import "MultipleAxesController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "WeatherData.h" @interface MultipleAxesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,17 +18,14 @@ @implementation MultipleAxesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Multiple Axes", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; NSMutableArray *chartData = [WeatherData demoData]; - chart.bindingX = @"monthName"; - XuniSeries *precip = [[XuniSeries alloc] initForChart:chart binding:@"precipitation, precipitation" name:@"Precip"]; - XuniSeries *temp= [[XuniSeries alloc] initForChart:chart binding:@"temp, temp" name:@"Avg. Temp"]; + self.chart.bindingX = @"monthName"; + XuniSeries *precip = [[XuniSeries alloc] initForChart:self.chart binding:@"precipitation, precipitation" name:@"Precip"]; + XuniSeries *temp= [[XuniSeries alloc] initForChart:self.chart binding:@"temp, temp" name:@"Avg. Temp"]; temp.chartType = XuniChartTypeSplineSymbols; - XuniAxis *axisT = [[XuniAxis alloc] initWithPosition:XuniPositionRight forChart:chart]; + XuniAxis *axisT = [[XuniAxis alloc] initWithPosition:XuniPositionRight forChart:self.chart]; axisT.min = @0; axisT.max = @80; axisT.majorUnit = 10; @@ -38,48 +36,25 @@ - (void)viewDidLoad { axisT.minorTickWidth = 0; axisT.titleTextColor = [UIColor colorWithRed:0.984 green:0.698 blue:0.345 alpha:1]; axisT.labelsVisible = YES; - [chart.axesArray addObject:axisT]; - - chart.itemsSource = chartData; - chart.axisY.min = @4; - chart.axisY.max = @20; - chart.axisY.majorUnit = 2; - chart.axisY.title = @"Precipitation (in)"; - chart.axisY.axisLineVisible = NO; - chart.axisY.majorTickWidth = 1; - chart.axisY.minorTickWidth = 0; - chart.axisY.titleTextColor = [UIColor colorWithRed:0.533 green:0.741 blue:0.902 alpha:1]; - chart.axisX.labelAngle = 90; - chart.axisX.majorGridVisible = NO; - chart.legend.position = XuniChartLegendPositionNone; + [self.chart.axesArray addObject:axisT]; + + self.chart.itemsSource = chartData; + self.chart.axisY.min = @4; + self.chart.axisY.max = @20; + self.chart.axisY.majorUnit = 2; + self.chart.axisY.title = @"Precipitation (in)"; + self.chart.axisY.axisLineVisible = NO; + self.chart.axisY.majorTickWidth = 1; + self.chart.axisY.minorTickWidth = 0; + self.chart.axisY.titleTextColor = [UIColor colorWithRed:0.533 green:0.741 blue:0.902 alpha:1]; + self.chart.axisX.labelAngle = 90; + self.chart.axisX.majorGridVisible = NO; + self.chart.legend.position = XuniChartLegendPositionNone; [temp setAxisY:axisT]; - [chart.series addObject:precip]; - [chart.series addObject:temp]; - - chart.tag = 1; - [self.view addSubview:chart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + [self.chart.series addObject:precip]; + [self.chart.series addObject:temp]; } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [chart setNeedsDisplay]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ScrollingController.m b/ObjectiveC/FlexChart101/FlexChart101/ScrollingController.m index 1824259..1f6df41 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ScrollingController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ScrollingController.m @@ -6,10 +6,11 @@ // #import "ScrollingController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "WeatherData.h" @interface ScrollingController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,10 +18,8 @@ @implementation ScrollingController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Scrolling", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; NSMutableArray *chartData = [WeatherData demoData]; XuniSeries *precip = [[XuniSeries alloc] initForChart:chart binding:@"precipitation" name:@"Precip"]; @@ -53,7 +52,7 @@ - (void)viewDidLoad { chart.axisX.majorGridVisible = NO; chart.axisX.displayedRange = 10; chart.palette = [XuniPalettes midnight]; - chart.header = NSLocalizedString(@"Drag to scroll/Pinch to zoom", nil); + chart.header = @"Drag to scroll/Pinch to zoom"; chart.headerFont = [UIFont systemFontOfSize:14]; chart.headerTextAlignment = XuniHorizontalAlignmentCenter; @@ -63,30 +62,8 @@ - (void)viewDidLoad { [chart.series addObject:temp]; [chart.series addObject:volume]; - chart.tag = 1; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [chart setNeedsDisplay]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/SelectionModesController.m b/ObjectiveC/FlexChart101/FlexChart101/SelectionModesController.m index 43e6c4c..73700d6 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/SelectionModesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/SelectionModesController.m @@ -6,38 +6,31 @@ // #import "SelectionModesController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface SelectionModesController (){ NSMutableArray *chartTypePickerData; NSMutableArray *selectionModePickerData; } +@property (weak, nonatomic) IBOutlet FlexChart *chart; +@property (weak, nonatomic) IBOutlet UIPickerView *picker; @end @implementation SelectionModesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Selection Modes", nil)]; - // Do any additional setup after loading the view. + chartTypePickerData =[[NSMutableArray alloc] initWithObjects:@"Column", @"Bar", @"Scatter", @"Line", @"LineSymbol", @"Area", nil]; selectionModePickerData = [[NSMutableArray alloc]initWithObjects: @"None", @"Series", @"Point", nil]; - UIPickerView *chartTypePicker = [[UIPickerView alloc] init]; - chartTypePicker.delegate = self; - chartTypePicker.showsSelectionIndicator = YES; - chartTypePicker.hidden = false; - UIPickerView *selectionModePicker = [[UIPickerView alloc] init]; - selectionModePicker.delegate = self; - selectionModePicker.tag = 3; - selectionModePicker.showsSelectionIndicator = YES; - selectionModePicker.hidden = false; + self.picker.delegate = self; NSMutableArray *chartData = [ChartData demoData]; - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; @@ -53,50 +46,24 @@ - (void)viewDidLoad { chart.selectedBorderColor = [UIColor redColor]; chart.selectedBorderWidth = 3; chart.selectedDashes = [[NSArray alloc] initWithObjects:@7.5, @2.5, nil]; - - chart.tag = 1; - chartTypePicker.tag = 2; - selectionModePicker.tag = 3; - - [self.view addSubview:chartTypePicker]; - [self.view addSubview:selectionModePicker]; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - [chartTypePicker selectRow:0 inComponent:0 animated:NO]; - - UIPickerView *selectionModePicker = (UIPickerView*)[self.view viewWithTag:3]; - [selectionModePicker selectRow:1 inComponent:0 animated:NO]; + [self.picker selectRow:0 inComponent:0 animated:NO]; + [self.picker selectRow:1 inComponent:1 animated:NO]; } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - UIPickerView *selectionModePicker = (UIPickerView*)[self.view viewWithTag:3]; - - chartTypePicker.frame = CGRectMake(0, 44, self.view.bounds.size.width / 2, 162); - selectionModePicker.frame = CGRectMake(self.view.bounds.size.width / 2, 44, self.view.bounds.size.width / 2, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; + return 2; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - if(pickerView.tag == 2){ + if(component == 0){ return [chartTypePickerData count]; } else{ @@ -105,9 +72,8 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; - - if(pickerView.tag == 2) + FlexChart *chart = self.chart; + if(component == 0) { if (row == 0) { chart.chartType = XuniChartTypeColumn; @@ -128,7 +94,7 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp chart.chartType = XuniChartTypeArea; } } - else if(pickerView.tag == 3){ + else if(component == 1){ if (row == 0) { chart.selectionMode = XuniSelectionModeNone; } @@ -142,25 +108,16 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - if(pickerView.tag == 2) + if(component == 0) { return [chartTypePickerData objectAtIndex:row]; } - else if(pickerView.tag == 3){ + else if(component == 1){ return [selectionModePickerData objectAtIndex:row]; } else{ return @"error"; } } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/SnapshotController.m b/ObjectiveC/FlexChart101/FlexChart101/SnapshotController.m index d1a57f6..937478c 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/SnapshotController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/SnapshotController.m @@ -6,25 +6,27 @@ // #import "SnapshotController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface SnapshotController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation SnapshotController +- (IBAction)doSnapshot:(id)sender { + FlexChart *chart = self.chart; + UIImage *image = [[UIImage alloc] init]; + image = [UIImage imageWithData:[chart getImage]]; + UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotoAlbum:finishedSavingWithError:contextInfo:), nil); + +} - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Export Image", nil)]; - // Do any additional setup after loading the view. - UIButton *snapshotButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [snapshotButton setTitle:NSLocalizedString(@"Take a snapshot", nil) forState:UIControlStateNormal]; - [snapshotButton addTarget:self action:@selector(snapshotButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; @@ -36,42 +38,15 @@ - (void)viewDidLoad { chart.bindingX = @"name"; chart.itemsSource = [ChartData demoData]; - chart.tag = 1; - snapshotButton.tag = 2; - - [self.view addSubview:chart]; - [self.view addSubview:snapshotButton]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews { - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIButton *snapshotButton = (UIButton*)[self.view viewWithTag:2]; - - chart.frame = CGRectMake(5, 115, self.view.bounds.size.width-10, self.view.bounds.size.height-115); - snapshotButton.frame = CGRectMake(0, 65, self.view.bounds.size.width, 50); - [chart setNeedsDisplay]; -} - -- (void)snapshotButtonClicked { - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIImage *image = [[UIImage alloc] init]; - image = [UIImage imageWithData:[chart getImage]]; - UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotoAlbum:finishedSavingWithError:contextInfo:), nil); -} - (void)imageSavedToPhotoAlbum:(UIImage *)image finishedSavingWithError:(NSError *)error contextInfo:(void *)contextInfo { NSString *message; NSString *title; if (!error) { - title = NSLocalizedString(@"Succes", nil); + title = NSLocalizedString(@"Success", nil); message = NSLocalizedString(@"Image was saved to Camera Roll successfully", nil); } else { @@ -83,14 +58,5 @@ - (void)imageSavedToPhotoAlbum:(UIImage *)image finishedSavingWithError:(NSError [alert show]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/StylingSeriesController.m b/ObjectiveC/FlexChart101/FlexChart101/StylingSeriesController.m index d64b8f7..51849b6 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/StylingSeriesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/StylingSeriesController.m @@ -6,10 +6,11 @@ // #import "StylingSeriesController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface StylingSeriesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @@ -17,10 +18,8 @@ @implementation StylingSeriesController - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Styling Series", nil)]; - // Do any additional setup after loading the view. - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses" name:@"Expenses"]; XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads" name:@"Downloads"]; @@ -44,31 +43,7 @@ - (void)viewDidLoad { chart.bindingX = @"name"; chart.itemsSource = [ChartData demoData]; - chart.tag = 1; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - chart.frame = CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height - 55); - [chart setNeedsDisplay]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ThemingController.m b/ObjectiveC/FlexChart101/FlexChart101/ThemingController.m index 066ee14..7a72770 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ThemingController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ThemingController.m @@ -6,12 +6,14 @@ // #import "ThemingController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface ThemingController (){ NSMutableArray *pickerData; } +@property (weak, nonatomic) IBOutlet FlexChart *chart; +@property (weak, nonatomic) IBOutlet UIPickerView *picker; @end @implementation ThemingController @@ -20,16 +22,11 @@ - (void)viewDidLoad { [super viewDidLoad]; [self setTitle:NSLocalizedString(@"Theming", nil)]; - // Do any additional setup after loading the view. - UIPickerView *pickerView; pickerData =[[NSMutableArray alloc] initWithObjects:@"Standard", @"Cocoa", @"Coral", @"Dark", @"HighContrast", @"Light", @"Midnight", @"Minimal", @"Modern", @"Organic", @"Slate", @"Zen", @"Cyborg", @"Superhero", @"Flatly", @"Darkly", @"Cerulean", nil]; - pickerView = [[UIPickerView alloc] init]; - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; + self.picker.delegate = self; - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; XuniSeries *downloads = [[XuniSeries alloc] initForChart:chart binding:@"downloads, downloads" name:@"Downloads"]; @@ -41,30 +38,9 @@ - (void)viewDidLoad { chart.bindingX = @"name"; chart.itemsSource = [ChartData demoData]; - chart.tag = 1; - pickerView.tag = 2; - - [self.view addSubview:chart]; - [self.view addSubview:pickerView]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:2]; - - pickerView.frame = CGRectMake(self.view.bounds.size.width/4, 44, self.view.bounds.size.width/2, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; -} - - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ return 1; } @@ -74,7 +50,7 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; + FlexChart *chart = self.chart; switch (row) { case 0: chart.palette = [XuniPalettes standard]; @@ -135,14 +111,5 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ return [pickerData objectAtIndex:row]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ToggleSeriesController.m b/ObjectiveC/FlexChart101/FlexChart101/ToggleSeriesController.m index 79a683a..0f82aa2 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ToggleSeriesController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ToggleSeriesController.m @@ -7,41 +7,31 @@ #import "ToggleSeriesController.h" #import "ChartData.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; @interface ToggleSeriesController () +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation ToggleSeriesController +- (IBAction)switchChanged:(id)sender { + UISwitch* switchState = (UISwitch*)sender; + int index = switchState.tag; + if ([switchState isOn]) { + ((XuniSeries *)[self.chart.series objectAtIndex:index]).visibility = XuniSeriesVisibilityVisible; + } + else + { + ((XuniSeries *)[self.chart.series objectAtIndex:index]).visibility = XuniSeriesVisibilityHidden; + } +} - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Toggle Series", nil)]; - - // Do any additional setup after loading the view. + NSMutableArray *chartData = [ChartData demoData]; - FlexChart *chart = [[FlexChart alloc] init]; - UISwitch *salesSwitch = [[UISwitch alloc]init]; - UISwitch *expensesSwitch = [[UISwitch alloc]init]; - UISwitch *downloadsSwitch = [[UISwitch alloc]init]; - UILabel *salesLabel = [[UILabel alloc]init]; - UILabel *expensesLabel = [[UILabel alloc]init]; - UILabel *downloadsLabel = [[UILabel alloc]init]; - - salesLabel.text = @"Sales"; - expensesLabel.text = @"Expenses"; - downloadsLabel.text = @"Downloads"; - salesLabel.textAlignment = NSTextAlignmentCenter; - expensesLabel.textAlignment = NSTextAlignmentCenter; - downloadsLabel.textAlignment = NSTextAlignmentCenter; - - salesSwitch.on = YES; - expensesSwitch.on = YES; - downloadsSwitch.on = YES; - [salesSwitch addTarget:self action:@selector(salesSwitchChanged:) forControlEvents:UIControlEventValueChanged]; - [expensesSwitch addTarget:self action:@selector(expensesSwitchChanged:) forControlEvents:UIControlEventValueChanged]; - [downloadsSwitch addTarget:self action:@selector(downloadsSwitchChanged:) forControlEvents:UIControlEventValueChanged]; + FlexChart *chart = self.chart; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"sales, sales" name:@"Sales"]; XuniSeries *expenses = [[XuniSeries alloc] initForChart:chart binding:@"expenses, expenses" name:@"Expenses"]; @@ -55,97 +45,7 @@ - (void)viewDidLoad { chart.chartType = XuniChartTypeLineSymbols; chart.selectionMode = XuniSelectionModeSeries; - chart.tag = 1; - salesSwitch.tag = 2; - expensesSwitch.tag = 3; - downloadsSwitch.tag = 4; - salesLabel.tag = 5; - expensesLabel.tag = 6; - downloadsLabel.tag = 7; - - [self.view addSubview:chart]; - [self.view addSubview:salesSwitch]; - [self.view addSubview:expensesSwitch]; - [self.view addSubview:downloadsSwitch]; - [self.view addSubview:salesLabel]; - [self.view addSubview:expensesLabel]; - [self.view addSubview:downloadsLabel]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UISwitch *salesSwitch = (UISwitch*)[self.view viewWithTag:2]; - UISwitch *expensesSwitch = (UISwitch*)[self.view viewWithTag:3]; - UISwitch *downloadsSwitch = (UISwitch*)[self.view viewWithTag:4]; - UILabel *salesLabel = (UILabel*)[self.view viewWithTag:5]; - UILabel *expensesLabel = (UILabel*)[self.view viewWithTag:6]; - UILabel *downloadsLabel = (UILabel*)[self.view viewWithTag:7]; - CGFloat switchWidth = self.view.bounds.size.width / 8; - CGFloat switchpadding = self.view.bounds.size.width * 5 / 32; - CGFloat labelWidth = self.view.bounds.size.width / 4; - CGFloat labelpadding = self.view.bounds.size.width / 4 / 4; - CGFloat controlHeight = self.view.bounds.size.height / 16; - - chart.frame = CGRectMake(0, self.view.bounds.size.height * 2 / 8, self.view.bounds.size.width, self.view.bounds.size.height - (self.view.bounds.size.height * 2 / 8 )); - salesSwitch.frame = CGRectMake(switchpadding - 10, controlHeight * 3, switchWidth, controlHeight); - expensesSwitch.frame = CGRectMake(switchpadding * 2 + switchWidth, controlHeight * 3, switchWidth, controlHeight); - downloadsSwitch.frame = CGRectMake(switchpadding * 3 + switchWidth * 2, controlHeight * 3, switchWidth, controlHeight); - salesLabel.frame = CGRectMake(labelpadding, self.view.bounds.size.height / 8, labelWidth, controlHeight); - expensesLabel.frame = CGRectMake(labelpadding * 2 + labelWidth, self.view.bounds.size.height / 8, labelWidth, controlHeight); - downloadsLabel.frame = CGRectMake(labelpadding * 3 + labelWidth * 2, self.view.bounds.size.height / 8, labelWidth, controlHeight); - - [chart setNeedsDisplay]; -} - -- (void)salesSwitchChanged:(UISwitch *)switchState{ - FlexChart *chart = (FlexChart*) [self.view viewWithTag:1]; - - if ([switchState isOn]) { - ((XuniSeries *)[chart.series objectAtIndex:0]).visibility = XuniSeriesVisibilityVisible; - } - else - { - ((XuniSeries *)[chart.series objectAtIndex:0]).visibility = XuniSeriesVisibilityHidden; - } -} - -- (void)expensesSwitchChanged:(UISwitch *)switchState{ - FlexChart *chart = (FlexChart*) [self.view viewWithTag:1]; - - if ([switchState isOn]) { - ((XuniSeries *)[chart.series objectAtIndex:1]).visibility = XuniSeriesVisibilityVisible; - } - else - { - ((XuniSeries *)[chart.series objectAtIndex:1]).visibility = XuniSeriesVisibilityHidden; - } -} - -- (void)downloadsSwitchChanged:(UISwitch *)switchState{ - FlexChart *chart = (FlexChart*) [self.view viewWithTag:1]; - - if ([switchState isOn]) { - ((XuniSeries *)[chart.series objectAtIndex:2]).visibility = XuniSeriesVisibilityVisible; - } - else - { - ((XuniSeries *)[chart.series objectAtIndex:2]).visibility = XuniSeriesVisibilityHidden; - } -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/UpdateAnimationController.m b/ObjectiveC/FlexChart101/FlexChart101/UpdateAnimationController.m index c666905..63d190a 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/UpdateAnimationController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/UpdateAnimationController.m @@ -6,7 +6,7 @@ // #import "UpdateAnimationController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @implementation UpdateData @@ -47,41 +47,67 @@ @interface UpdateAnimationController () { NSMutableArray *updatePositionPickerData; NSMutableArray *chartData; } +@property (weak, nonatomic) IBOutlet UIPickerView *picker; +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation UpdateAnimationController +- (IBAction)addPoint:(id)sender { + FlexChart *chart = self.chart; + UIPickerView *updatePositionPicker = self.picker; + NSInteger row = [updatePositionPicker selectedRowInComponent:1]; + int num = 65 + rand() % (90 - 65 + 1); + UpdateData *data = [[UpdateData alloc] initWithXValue:[NSString stringWithFormat:@"%c", num] + y:[UpdateData randomNumberBetween:10 max:80]]; + + if (row == 0) { + [chart.collectionView insertObject:data atIndex:0]; + } + else if (row == 1) { + [chart.collectionView insertObject:data atIndex:chart.collectionView.itemCount / 2]; + } + else if (row == 2) { + [chart.collectionView addObject:data]; + } +} + +- (IBAction)removePoint:(id)sender { + FlexChart *chart = self.chart; + UIPickerView *updatePositionPicker = self.picker; + NSInteger row = [updatePositionPicker selectedRowInComponent:1]; + + if (row == 0) { + [chart.collectionView removeAt:0]; + } + else if (row == 1) { + [chart.collectionView removeAt:chart.collectionView.itemCount / 2]; + } + else if (row == 2) { + [chart.collectionView removeAt:chart.collectionView.itemCount - 1]; + } + +} + - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Update Animation", nil)]; + [self setTitle:@"Update Animation"]; // Do any additional setup after loading the view. chartTypePickerData =[[NSMutableArray alloc] initWithObjects:@"Column", @"Area", @"Line", @"LineSymbols", @"Spline", @"SplineSymbols", @"SplineArea", @"Scatter", nil]; updatePositionPickerData = [[NSMutableArray alloc]initWithObjects: @"Beginning", @"Middle", @"End", nil]; chartData = [[NSMutableArray alloc] initWithArray:[UpdateData demoData]]; - UIPickerView *chartTypePicker = [[UIPickerView alloc] init]; - chartTypePicker.delegate = self; - chartTypePicker.showsSelectionIndicator = YES; - chartTypePicker.hidden = false; - [chartTypePicker selectRow:0 inComponent:0 animated:false]; + self.picker.delegate = self; - UIPickerView *updatePositionPicker = [[UIPickerView alloc] init]; - updatePositionPicker.delegate = self; - updatePositionPicker.showsSelectionIndicator = YES; - updatePositionPicker.hidden = false; - [updatePositionPicker selectRow:0 inComponent:0 animated:false]; + + [self.picker selectRow:0 inComponent:0 animated:false]; - UIButton *addPointBtn = [UIButton buttonWithType:UIButtonTypeSystem]; - [addPointBtn setTitle:NSLocalizedString(@"Add Point", nil) forState:UIControlStateNormal]; - [addPointBtn addTarget:self action:@selector(addPointAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.picker selectRow:0 inComponent:1 animated:false]; - UIButton *removePointBtn = [UIButton buttonWithType:UIButtonTypeSystem]; - [removePointBtn setTitle:NSLocalizedString(@"Remove Point", nil) forState:UIControlStateNormal]; - [removePointBtn addTarget:self action:@selector(removePointAction) forControlEvents:UIControlEventTouchUpInside]; - - FlexChart *chart = [[FlexChart alloc] init]; + FlexChart *chart = self.chart; XuniSeries *value = [[XuniSeries alloc] initForChart:chart binding:@"value" name:@"value"]; [chart.series addObject:value]; @@ -93,47 +119,16 @@ - (void)viewDidLoad { chart.axisY.axisLineVisible = NO; chart.axisY.majorTickWidth = 0; - chart.tag = 1; - chartTypePicker.tag = 2; - updatePositionPicker.tag = 3; - addPointBtn.tag = 4; - removePointBtn.tag = 5; - - [self.view addSubview:chartTypePicker]; - [self.view addSubview:updatePositionPicker]; - [self.view addSubview:addPointBtn]; - [self.view addSubview:removePointBtn]; - [self.view addSubview:chart]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *chartTypePicker = (UIPickerView*)[self.view viewWithTag:2]; - UIPickerView *updatePositionPicker = (UIPickerView*)[self.view viewWithTag:3]; - UIButton *addPointBtn = (UIButton*)[self.view viewWithTag:4]; - UIButton *removePointBtn = (UIButton*)[self.view viewWithTag:5]; - - chartTypePicker.frame = CGRectMake(0, 44, self.view.bounds.size.width / 2, 162); - updatePositionPicker.frame = CGRectMake(self.view.bounds.size.width / 2, 44, self.view.bounds.size.width / 2, 162); - addPointBtn.frame = CGRectMake(20, 206, 120, 40); - removePointBtn.frame = CGRectMake(160, 206, 150, 40); - chart.frame = CGRectMake(0, 206 + 40, self.view.bounds.size.width, self.view.bounds.size.height - 206 - 40); - [chart setNeedsDisplay]; -} - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; + return 2; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - if(pickerView.tag == 2){ + if(component == 0){ return [chartTypePickerData count]; } else{ @@ -142,9 +137,9 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; + FlexChart *chart = self.chart; - if(pickerView.tag == 2) + if(component == 0) { if (row == 0) { chart.chartType = XuniChartTypeColumn; @@ -174,11 +169,11 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - if(pickerView.tag == 2) + if(component == 0) { return [chartTypePickerData objectAtIndex:row]; } - else if(pickerView.tag == 3){ + else if(component == 1){ return [updatePositionPickerData objectAtIndex:row]; } else{ @@ -186,49 +181,5 @@ - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row fo } } -- (void)addPointAction { - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *updatePositionPicker = (UIPickerView*)[self.view viewWithTag:3]; - NSInteger row = [updatePositionPicker selectedRowInComponent:0]; - int num = 65 + rand() % (90 - 65 + 1); - UpdateData *data = [[UpdateData alloc] initWithXValue:[NSString stringWithFormat:@"%c", num] - y:[UpdateData randomNumberBetween:10 max:80]]; - - if (row == 0) { - [chart.collectionView insertObject:data atIndex:0]; - } - else if (row == 1) { - [chart.collectionView insertObject:data atIndex:chart.collectionView.itemCount / 2]; - } - else if (row == 2) { - [chart.collectionView addObject:data]; - } -} - -- (void)removePointAction { - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *updatePositionPicker = (UIPickerView*)[self.view viewWithTag:3]; - NSInteger row = [updatePositionPicker selectedRowInComponent:0]; - - if (row == 0) { - [chart.collectionView removeAt:0]; - } - else if (row == 1) { - [chart.collectionView removeAt:chart.collectionView.itemCount / 2]; - } - else if (row == 2) { - [chart.collectionView removeAt:chart.collectionView.itemCount - 1]; - } -} - -/* - #pragma mark - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - } - */ @end \ No newline at end of file diff --git a/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.h b/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.h index 63682e2..1084383 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.h +++ b/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.h @@ -7,5 +7,5 @@ #import -@interface ZoomingAndScrollingController : UIViewController +@interface ZoomingAndScrollingController : UIViewController @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.m b/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.m index 3bff376..23bd7cc 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.m +++ b/ObjectiveC/FlexChart101/FlexChart101/ZoomingAndScrollingController.m @@ -6,33 +6,42 @@ // #import "ZoomingAndScrollingController.h" -#import "XuniFlexChartKit/XuniFlexChartKit.h" +@import XuniFlexChartDynamicKit; #import "ChartData.h" @interface ZoomingAndScrollingController (){ NSMutableArray *pickerData; } +@property (weak, nonatomic) IBOutlet UISegmentedControl *zoomModeSelector; +@property (weak, nonatomic) IBOutlet FlexChart *chart; @end @implementation ZoomingAndScrollingController +- (IBAction)zoomModeChanged:(id)sender { + int row = self.zoomModeSelector.selectedSegmentIndex; + if (row == 0) { + self.chart.zoomMode = XuniZoomModeX; + } + else if (row == 1){ + self.chart.zoomMode = XuniZoomModeY; + } + else if (row == 2){ + self.chart.zoomMode = XuniZoomModeXY; + } + else if (row == 3){ + self.chart.zoomMode = XuniZoomModeDisabled; + } + +} - (void)viewDidLoad { [super viewDidLoad]; - [self setTitle:NSLocalizedString(@"Zooming and Scrolling", nil)]; + + FlexChart *chart = self.chart; - // Do any additional setup after loading the view. - pickerData =[[NSMutableArray alloc] initWithObjects:@"X", @"Y", @"XY", @"Disabled", nil]; - UILabel *label = [[UILabel alloc] init]; - UIPickerView *pickerView = [[UIPickerView alloc] init]; - FlexChart *chart = [[FlexChart alloc] init]; - - label.text = @"Zoom Mode"; - - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; - [pickerView selectRow:2 inComponent:0 animated:false]; + self.zoomModeSelector.selectedSegmentIndex = 2; + [self zoomModeChanged:nil]; XuniSeries *sales = [[XuniSeries alloc] initForChart:chart binding:@"y" name:@"Normal Distribution"]; [chart.series addObject:sales]; @@ -42,76 +51,13 @@ - (void)viewDidLoad { chart.chartType = XuniChartTypeScatter; chart.zoomMode = XuniZoomModeXY; chart.isAnimated = NO; - chart.header = NSLocalizedString(@"Drag to scroll/Pinch to zoom", nil); + chart.header = @"Drag to scroll/Pinch to zoom"; chart.headerFont = [UIFont systemFontOfSize:14]; chart.headerTextAlignment = XuniHorizontalAlignmentCenter; chart.palette = [XuniPalettes superhero]; chart.axisY.format = @"N2"; - - chart.tag = 1; - pickerView.tag = 2; - label.tag = 3; - - [self.view addSubview:label]; - [self.view addSubview:pickerView]; - [self.view addSubview:chart]; -} -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - FlexChart *chart = (FlexChart*)[self.view viewWithTag:1]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:2]; - UILabel *label = (UILabel*)[self.view viewWithTag:3]; - - label.frame = CGRectMake(10, 110, 50, 25); - [label sizeToFit]; - pickerView.frame = CGRectMake(self.view.bounds.size.width/3, 44, self.view.bounds.size.width/2, 162); - chart.frame = CGRectMake(0, 206, self.view.bounds.size.width, self.view.bounds.size.height - 206); - [chart setNeedsDisplay]; } -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - return [pickerData count]; -} - -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexChart *chart = (FlexChart *)[self.view viewWithTag:1]; - - if (row == 0) { - chart.zoomMode = XuniZoomModeX; - } - else if (row == 1){ - chart.zoomMode = XuniZoomModeY; - } - else if (row == 2){ - chart.zoomMode = XuniZoomModeXY; - } - else if (row == 3){ - chart.zoomMode = XuniZoomModeDisabled; - } -} - -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - return [pickerData objectAtIndex:row]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings index 4d45781..5b79e70 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings +++ b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ -/* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +/* Class = "UILabel"; text = "FlexChart101"; ObjectID = "NsB-Y2-PHc"; */ +"NsB-Y2-PHc.text" = "FlexChart101"; -/* Class = "UILabel"; text = "FlexChart101"; ObjectID = "kId-c2-rCX"; */ -"kId-c2-rCX.text" = "FlexChart101"; +/* Class = "UILabel"; text = " Copyright (c) 2016 GrapeCity. All rights reserved."; ObjectID = "vwq-n0-dls"; */ +"vwq-n0-dls.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; diff --git a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Localizable.strings b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Localizable.strings index c76b636..52ee2a8 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Localizable.strings +++ b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Localizable.strings @@ -55,6 +55,9 @@ "Export Image" = "画像として保存"; +"Annotations" = "チャートの注釈"; + + // Samples Description "Shows a simple chart with tooltips." = "ツールチップを備えたチャート"; @@ -105,6 +108,9 @@ "Shows how to export an image of FlexChart." = "FlexChart を画像として保存する方法"; +"Shows how to display annotations on FlexChart." = "チャートに各種形状の注釈を表示する方法"; + + // Strings "Add Point" = "データ点の追加"; diff --git a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Main.strings b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Main.strings index 4511456..842a7da 100644 --- a/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Main.strings +++ b/ObjectiveC/FlexChart101/FlexChart101/ja.lproj/Main.strings @@ -1,6 +1,156 @@ -/* Class = "UIBarButtonItem"; title = "FlexChart101"; ObjectID = "agU-Ri-rsm"; */ -"agU-Ri-rsm.title" = "FlexChart101"; +/* Class = "UILabel"; text = "Downloads"; ObjectID = "1ma-Si-CBO"; */ +"1ma-Si-CBO.text" = "Downloads"; -/* Class = "UINavigationItem"; title = "FlexChart101"; ObjectID = "geB-Xl-WoV"; */ -"geB-Xl-WoV.title" = "FlexChart101"; +/* Class = "UISegmentedControl"; 1zT-tA-usj.segmentTitles[0] = "Candle"; ObjectID = "1zT-tA-usj"; */ +"1zT-tA-usj.segmentTitles[0]" = "Candle"; + +/* Class = "UISegmentedControl"; 1zT-tA-usj.segmentTitles[1] = "HLOC"; ObjectID = "1zT-tA-usj"; */ +"1zT-tA-usj.segmentTitles[1]" = "HLOC"; + +/* Class = "UINavigationItem"; title = "Mixed Chart Types"; ObjectID = "2mT-gA-nEZ"; */ +"2mT-gA-nEZ.title" = "Mixed Chart Types"; + +/* Class = "UILabel"; text = "Subtitle"; ObjectID = "3We-j7-APK"; */ +"3We-j7-APK.text" = "Subtitle"; + +/* Class = "UILabel"; text = "X Y Values"; ObjectID = "3Zb-aI-qhA"; */ +"3Zb-aI-qhA.text" = "X Y Values"; + +/* Class = "UISegmentedControl"; 3fn-CR-JhB.segmentTitles[0] = "X"; ObjectID = "3fn-CR-JhB"; */ +"3fn-CR-JhB.segmentTitles[0]" = "X"; + +/* Class = "UISegmentedControl"; 3fn-CR-JhB.segmentTitles[1] = "Y"; ObjectID = "3fn-CR-JhB"; */ +"3fn-CR-JhB.segmentTitles[1]" = "Y"; + +/* Class = "UISegmentedControl"; 3fn-CR-JhB.segmentTitles[2] = "XY"; ObjectID = "3fn-CR-JhB"; */ +"3fn-CR-JhB.segmentTitles[2]" = "XY"; + +/* Class = "UISegmentedControl"; 3fn-CR-JhB.segmentTitles[3] = "Disabled"; ObjectID = "3fn-CR-JhB"; */ +"3fn-CR-JhB.segmentTitles[3]" = "Disabled"; + +/* Class = "UINavigationItem"; title = "Selection Modes"; ObjectID = "3jf-fg-a1m"; */ +"3jf-fg-a1m.title" = "Selection Modes"; + +/* Class = "UINavigationItem"; title = "Custom Tooltips"; ObjectID = "4mt-3y-STV"; */ +"4mt-3y-STV.title" = "Custom Tooltips"; + +/* Class = "UILabel"; text = "Point Index"; ObjectID = "75d-9j-w5m"; */ +"75d-9j-w5m.text" = "Point Index"; + +/* Class = "UINavigationItem"; title = "Annotations"; ObjectID = "7WY-l1-EQK"; */ +"7WY-l1-EQK.title" = "Annotations"; + +/* Class = "UINavigationItem"; title = "Theming"; ObjectID = "8HY-5m-v7a"; */ +"8HY-5m-v7a.title" = "Theming"; + +/* Class = "UILabel"; text = "Zoom mode"; ObjectID = "8qC-od-0ts"; */ +"8qC-od-0ts.text" = "Zoom mode"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[0] = "None"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[0]" = "None"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[1] = "Left"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[1]" = "Left"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[2] = "Top"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[2]" = "Top"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[3] = "Right"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[3]" = "Right"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[4] = "Bottom"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[4]" = "Bottom"; + +/* Class = "UISegmentedControl"; 8rk-86-cgC.segmentTitles[5] = "Center"; ObjectID = "8rk-86-cgC"; */ +"8rk-86-cgC.segmentTitles[5]" = "Center"; + +/* Class = "UILabel"; text = "Series"; ObjectID = "9xl-bu-qNV"; */ +"9xl-bu-qNV.text" = "Series"; + +/* Class = "UINavigationItem"; title = "Getting Started"; ObjectID = "AQM-7d-rGy"; */ +"AQM-7d-rGy.title" = "Getting Started"; + +/* Class = "UIBarButtonItem"; title = "Snapshot"; ObjectID = "DfF-89-8OJ"; */ +"DfF-89-8OJ.title" = "Snapshot"; + +/* Class = "UINavigationItem"; title = "Multiple Axes"; ObjectID = "Il8-E5-FBG"; */ +"Il8-E5-FBG.title" = "Multiple Axes"; + +/* Class = "UINavigationItem"; title = "Legend and TItles"; ObjectID = "JkL-T7-VtW"; */ +"JkL-T7-VtW.title" = "Legend and TItles"; + +/* Class = "UINavigationItem"; title = "Data Labels"; ObjectID = "KCT-aG-Rg4"; */ +"KCT-aG-Rg4.title" = "Data Labels"; + +/* Class = "UINavigationItem"; title = "Update Animation"; ObjectID = "KTI-ZM-zHy"; */ +"KTI-ZM-zHy.title" = "Update Animation"; + +/* Class = "UILabel"; text = "Chart Element"; ObjectID = "LWa-Kl-acd"; */ +"LWa-Kl-acd.text" = "Chart Element"; + +/* Class = "UINavigationItem"; title = "Basic Chart Types"; ObjectID = "NBt-FV-QtC"; */ +"NBt-FV-QtC.title" = "Basic Chart Types"; + +/* Class = "UINavigationItem"; title = "Conditional Formatting"; ObjectID = "NP2-Pc-gE0"; */ +"NP2-Pc-gE0.title" = "Conditional Formatting"; + +/* Class = "UINavigationItem"; title = "Export Image"; ObjectID = "PU8-Nc-hf9"; */ +"PU8-Nc-hf9.title" = "Export Image"; + +/* Class = "UILabel"; text = "Title"; ObjectID = "Qaz-W0-69e"; */ +"Qaz-W0-69e.text" = "Title"; + +/* Class = "UINavigationItem"; title = "Dynamic Charts"; ObjectID = "UMe-kt-zOT"; */ +"UMe-kt-zOT.title" = "Dynamic Charts"; + +/* Class = "UINavigationItem"; title = "Styling"; ObjectID = "Upi-Db-O1U"; */ +"Upi-Db-O1U.title" = "Styling"; + +/* Class = "UINavigationItem"; title = "Scrolling"; ObjectID = "VFR-EG-SYX"; */ +"VFR-EG-SYX.title" = "Scrolling"; + +/* Class = "UILabel"; text = "Expenses"; ObjectID = "W68-pQ-mxe"; */ +"W68-pQ-mxe.text" = "Expenses"; + +/* Class = "UINavigationItem"; title = "Load Animation"; ObjectID = "WEr-SH-6Ni"; */ +"WEr-SH-6Ni.title" = "Load Animation"; + +/* Class = "UINavigationItem"; title = "Line Marker"; ObjectID = "Wep-bA-SwB"; */ +"Wep-bA-SwB.title" = "Line Marker"; + +/* Class = "UINavigationItem"; title = "Customizing Axes"; ObjectID = "YF1-Hl-vBx"; */ +"YF1-Hl-vBx.title" = "Customizing Axes"; + +/* Class = "UISegmentedControl"; a4W-9s-xi7.segmentTitles[0] = "None"; ObjectID = "a4W-9s-xi7"; */ +"a4W-9s-xi7.segmentTitles[0]" = "None"; + +/* Class = "UISegmentedControl"; a4W-9s-xi7.segmentTitles[1] = "Move"; ObjectID = "a4W-9s-xi7"; */ +"a4W-9s-xi7.segmentTitles[1]" = "Move"; + +/* Class = "UISegmentedControl"; a4W-9s-xi7.segmentTitles[2] = "Drag"; ObjectID = "a4W-9s-xi7"; */ +"a4W-9s-xi7.segmentTitles[2]" = "Drag"; + +/* Class = "UINavigationItem"; title = "Hit Test"; ObjectID = "aPy-25-HQh"; */ +"aPy-25-HQh.title" = "Hit Test"; + +/* Class = "UINavigationItem"; title = "Financial Chart"; ObjectID = "bh7-Or-Iq1"; */ +"bh7-Or-Iq1.title" = "Financial Chart"; + +/* Class = "UINavigationItem"; title = "Custom Plot Elements"; ObjectID = "hna-U0-UrC"; */ +"hna-U0-UrC.title" = "Custom Plot Elements"; + +/* Class = "UINavigationItem"; title = "Bubble Chart"; ObjectID = "i8F-MK-1Fc"; */ +"i8F-MK-1Fc.title" = "Bubble Chart"; + +/* Class = "UINavigationItem"; title = "Zooming and Scrolling"; ObjectID = "txQ-Vd-QOC"; */ +"txQ-Vd-QOC.title" = "Zooming and Scrolling"; + +/* Class = "UINavigationItem"; title = "Toggle Series"; ObjectID = "vVz-HP-feV"; */ +"vVz-HP-feV.title" = "Toggle Series"; + +/* Class = "UILabel"; text = "Sales"; ObjectID = "wu0-uU-Fa0"; */ +"wu0-uU-Fa0.text" = "Sales"; + +/* Class = "UINavigationItem"; title = "FlexChart101"; ObjectID = "xGO-ok-ekk"; */ +"xGO-ok-ekk.title" = "FlexChart101"; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj b/ObjectiveC/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj index 1943ef4..28d1d05 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj +++ b/ObjectiveC/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj @@ -7,6 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + 4C06B2CB1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */; }; + 4C06B2CC1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C06B2CD1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */; }; + 4C06B2CE1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C06B2CF1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */; }; + 4C06B2D01D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C1C57061D26DED3007491EB /* flexgrid_headers.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C1C57051D26DED3007491EB /* flexgrid_headers.png */; }; 4C219E801C91B3240089B6B0 /* filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E711C91B3240089B6B0 /* filter.png */; }; 4C219E811C91B3240089B6B0 /* flexgrid_columns.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */; }; 4C219E821C91B3240089B6B0 /* flexgrid_custom.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */; }; @@ -24,29 +31,34 @@ 4C219E8E1C91B3240089B6B0 /* show.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7F1C91B3240089B6B0 /* show.png */; }; 4C219E921C91C3FD0089B6B0 /* RowDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C219E911C91C3FD0089B6B0 /* RowDetailsViewController.m */; }; 4C219E981C91C90D0089B6B0 /* CustomMergingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C219E971C91C90D0089B6B0 /* CustomMergingViewController.m */; }; + 4C26BAAA1D1305AA00F65D77 /* UnboundSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.m */; }; + 4C393DCF1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.m */; }; + 4C393DD21D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.m */; }; + 4C393DD31D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.m */; }; 4C41F60E1BDE854900D3F97A /* OnDemandController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C41F60D1BDE854900D3F97A /* OnDemandController.m */; }; 4C435CA51BD7AA1E0099A651 /* StarSizingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CA41BD7AA1D0099A651 /* StarSizingController.m */; }; 4C435CAA1BD7FD930099A651 /* FrozenCellsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CA91BD7FD930099A651 /* FrozenCellsController.m */; }; 4C435CB11BD8C5F20099A651 /* ConditionalFormattingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.m */; }; 4C435CBC1BD8D92B0099A651 /* EditingFormController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CBB1BD8D92B0099A651 /* EditingFormController.m */; }; + 4C58D0581CAC305100A6DF33 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C58D0571CAC305100A6DF33 /* MapKit.framework */; }; + 4C58D05A1CAC324100A6DF33 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */; }; 4C63EDBE1BD94F6E00209E09 /* CustomerObjectEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.m */; }; 4C63EDC11BD95A2700209E09 /* ColumnLayoutController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.m */; }; 4C63EDC61BDA1AED00209E09 /* ColumnReordererTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.m */; }; 4CA291021C07BD78008EA95D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CA291041C07BD78008EA95D /* Localizable.strings */; }; + 4CA67B5B1CAFE64700A1EE91 /* YouTubeCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.m */; }; + 4CA67B5E1CAFE76700A1EE91 /* SampleData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA67B5D1CAFE76700A1EE91 /* SampleData.m */; }; + 4CE266B41CB43C6000FD8F3C /* FilterGridViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.m */; }; F235736B1B44608100F300D7 /* License.m in Sources */ = {isa = PBXBuildFile; fileRef = F235736A1B44608100F300D7 /* License.m */; }; F23675D31B59503000194040 /* EditConfirmationController.m in Sources */ = {isa = PBXBuildFile; fileRef = F23675D21B59503000194040 /* EditConfirmationController.m */; }; - F2BA19551B2883CF00F2B835 /* XuniGaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2BA19541B2883CF00F2B835 /* XuniGaugeKit.framework */; }; - F2BA19581B288F1600F2B835 /* EditingController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2BA19571B288F1600F2B835 /* EditingController.m */; }; - F2BA19941B2B1E3200F2B835 /* FilterFormController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2BA19931B2B1E3200F2B835 /* FilterFormController.m */; }; - F2CFF3BF1B7122BB00FE6FDF /* SharedFilterData.m in Sources */ = {isa = PBXBuildFile; fileRef = F2CFF3BE1B7122BB00FE6FDF /* SharedFilterData.m */; }; + F2BA19581B288F1600F2B835 /* GettingStartedController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2BA19571B288F1600F2B835 /* GettingStartedController.m */; }; + F2CFF3BF1B7122BB00FE6FDF /* FilterData.m in Sources */ = {isa = PBXBuildFile; fileRef = F2CFF3BE1B7122BB00FE6FDF /* FilterData.m */; }; F2E2A9F31B27254E00AFEA5D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2A9F21B27254E00AFEA5D /* main.m */; }; F2E2A9F61B27254E00AFEA5D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2A9F51B27254E00AFEA5D /* AppDelegate.m */; }; - F2E2A9F91B27254E00AFEA5D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2A9F81B27254E00AFEA5D /* ViewController.m */; }; F2E2A9FC1B27254E00AFEA5D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FA1B27254E00AFEA5D /* Main.storyboard */; }; F2E2A9FE1B27254E00AFEA5D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */; }; F2E2AA011B27254E00AFEA5D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FF1B27254E00AFEA5D /* LaunchScreen.xib */; }; F2E2AA0D1B27254E00AFEA5D /* FlexGrid101Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA0C1B27254E00AFEA5D /* FlexGrid101Tests.m */; }; - F2E2AA261B27300A00AFEA5D /* GettingStartedController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA251B27300A00AFEA5D /* GettingStartedController.m */; }; F2E2AA291B27302300AFEA5D /* ColumnDefinitionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.m */; }; F2E2AA2C1B27303700AFEA5D /* SelectionModesController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA2B1B27303700AFEA5D /* SelectionModesController.m */; }; F2E2AA2F1B27304C00AFEA5D /* CustomCellsController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.m */; }; @@ -54,8 +66,6 @@ F2E2AA351B27307300AFEA5D /* FilterController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA341B27307300AFEA5D /* FilterController.m */; }; F2E2AA381B27308500AFEA5D /* FullTextFilterController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA371B27308500AFEA5D /* FullTextFilterController.m */; }; F2E2AA3E1B2731B700AFEA5D /* CustomerData.m in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA3D1B2731B700AFEA5D /* CustomerData.m */; }; - F2E2AA401B27345900AFEA5D /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2E2AA3F1B27345900AFEA5D /* XuniCoreKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; - F2E2AA421B27346E00AFEA5D /* XuniFlexGridKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2E2AA411B27346E00AFEA5D /* XuniFlexGridKit.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -68,7 +78,27 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C6165221D18490E0044D30A /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C06B2CE1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Embed Frameworks */, + 4C06B2CC1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C06B2D01D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexGridDynamicKit.framework; path = ../../../Controls/XuniFlexGridDynamicKit.framework; sourceTree = ""; }; + 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeDynamicKit.framework; path = ../../../Controls/XuniGaugeDynamicKit.framework; sourceTree = ""; }; + 4C1C57051D26DED3007491EB /* flexgrid_headers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_headers.png; sourceTree = ""; }; 4C219E711C91B3240089B6B0 /* filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = filter.png; sourceTree = ""; }; 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_columns.png; sourceTree = ""; }; 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_custom.png; sourceTree = ""; }; @@ -88,6 +118,11 @@ 4C219E911C91C3FD0089B6B0 /* RowDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RowDetailsViewController.m; sourceTree = ""; }; 4C219E961C91C90D0089B6B0 /* CustomMergingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomMergingViewController.h; sourceTree = ""; }; 4C219E971C91C90D0089B6B0 /* CustomMergingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomMergingViewController.m; sourceTree = ""; }; + 4C26BAA81D1305AA00F65D77 /* UnboundSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnboundSampleViewController.h; sourceTree = ""; }; + 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnboundSampleViewController.m; sourceTree = ""; }; + 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniCoreDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniCoreDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniFlexGridDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniFlexGridDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniGaugeDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniGaugeDesignTimeStoryboardSupport.m; sourceTree = ""; }; 4C41F60C1BDE854900D3F97A /* OnDemandController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnDemandController.h; sourceTree = ""; }; 4C41F60D1BDE854900D3F97A /* OnDemandController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnDemandController.m; sourceTree = ""; }; 4C435CA31BD7AA1D0099A651 /* StarSizingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StarSizingController.h; sourceTree = ""; }; @@ -98,42 +133,43 @@ 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConditionalFormattingController.m; sourceTree = ""; }; 4C435CBA1BD8D92B0099A651 /* EditingFormController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingFormController.h; sourceTree = ""; }; 4C435CBB1BD8D92B0099A651 /* EditingFormController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditingFormController.m; sourceTree = ""; }; + 4C58D04B1CA9B8EB00A6DF33 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 4C58D0571CAC305100A6DF33 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 4C63EDBC1BD94F6E00209E09 /* CustomerObjectEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomerObjectEditor.h; sourceTree = ""; }; 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomerObjectEditor.m; sourceTree = ""; }; 4C63EDBF1BD95A2700209E09 /* ColumnLayoutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColumnLayoutController.h; sourceTree = ""; }; 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColumnLayoutController.m; sourceTree = ""; }; 4C63EDC41BDA1AED00209E09 /* ColumnReordererTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColumnReordererTableViewController.h; sourceTree = ""; }; 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColumnReordererTableViewController.m; sourceTree = ""; }; - 4CA291001C07BD6F008EA95D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; 4CA291011C07BD70008EA95D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; 4CA291031C07BD78008EA95D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; 4CA291051C07BD7A008EA95D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + 4CA67B591CAFE64700A1EE91 /* YouTubeCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeCollectionView.h; sourceTree = ""; }; + 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YouTubeCollectionView.m; sourceTree = ""; }; + 4CA67B5C1CAFE76700A1EE91 /* SampleData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleData.h; sourceTree = ""; }; + 4CA67B5D1CAFE76700A1EE91 /* SampleData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SampleData.m; sourceTree = ""; }; + 4CE266B21CB43C6000FD8F3C /* FilterGridViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterGridViewController.h; sourceTree = ""; }; + 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FilterGridViewController.m; sourceTree = ""; }; F23573691B44608100F300D7 /* License.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = License.h; sourceTree = ""; }; F235736A1B44608100F300D7 /* License.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = License.m; sourceTree = ""; }; F23675D11B59503000194040 /* EditConfirmationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditConfirmationController.h; sourceTree = ""; }; F23675D21B59503000194040 /* EditConfirmationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditConfirmationController.m; sourceTree = ""; }; - F2BA19541B2883CF00F2B835 /* XuniGaugeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeKit.framework; path = "../../../Controls/XuniGaugeKit.framework"; sourceTree = ""; }; - F2BA19561B288F1600F2B835 /* EditingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingController.h; sourceTree = ""; }; - F2BA19571B288F1600F2B835 /* EditingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditingController.m; sourceTree = ""; }; - F2BA19921B2B1E3200F2B835 /* FilterFormController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterFormController.h; sourceTree = ""; }; - F2BA19931B2B1E3200F2B835 /* FilterFormController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FilterFormController.m; sourceTree = ""; }; - F2CFF3BD1B7122BB00FE6FDF /* SharedFilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedFilterData.h; sourceTree = ""; }; - F2CFF3BE1B7122BB00FE6FDF /* SharedFilterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SharedFilterData.m; sourceTree = ""; }; + F2BA19561B288F1600F2B835 /* GettingStartedController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GettingStartedController.h; sourceTree = ""; }; + F2BA19571B288F1600F2B835 /* GettingStartedController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GettingStartedController.m; sourceTree = ""; }; + F2CFF3BD1B7122BB00FE6FDF /* FilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterData.h; sourceTree = ""; }; + F2CFF3BE1B7122BB00FE6FDF /* FilterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FilterData.m; sourceTree = ""; }; F2E2A9ED1B27254C00AFEA5D /* FlexGrid101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlexGrid101.app; sourceTree = BUILT_PRODUCTS_DIR; }; F2E2A9F11B27254E00AFEA5D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F2E2A9F21B27254E00AFEA5D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; F2E2A9F41B27254E00AFEA5D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; F2E2A9F51B27254E00AFEA5D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - F2E2A9F71B27254E00AFEA5D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - F2E2A9F81B27254E00AFEA5D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; F2E2A9FB1B27254E00AFEA5D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; F2E2AA001B27254E00AFEA5D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; F2E2AA061B27254E00AFEA5D /* FlexGrid101Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlexGrid101Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F2E2AA0B1B27254E00AFEA5D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F2E2AA0C1B27254E00AFEA5D /* FlexGrid101Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlexGrid101Tests.m; sourceTree = ""; }; - F2E2AA241B27300A00AFEA5D /* GettingStartedController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GettingStartedController.h; sourceTree = ""; }; - F2E2AA251B27300A00AFEA5D /* GettingStartedController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GettingStartedController.m; sourceTree = ""; }; F2E2AA271B27302300AFEA5D /* ColumnDefinitionsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColumnDefinitionsController.h; sourceTree = ""; }; F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColumnDefinitionsController.m; sourceTree = ""; }; F2E2AA2A1B27303700AFEA5D /* SelectionModesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionModesController.h; sourceTree = ""; }; @@ -148,8 +184,6 @@ F2E2AA371B27308500AFEA5D /* FullTextFilterController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FullTextFilterController.m; sourceTree = ""; }; F2E2AA3C1B2731B700AFEA5D /* CustomerData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomerData.h; sourceTree = ""; }; F2E2AA3D1B2731B700AFEA5D /* CustomerData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomerData.m; sourceTree = ""; }; - F2E2AA3F1B27345900AFEA5D /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; - F2E2AA411B27346E00AFEA5D /* XuniFlexGridKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexGridKit.framework; path = "../../../Controls/XuniFlexGridKit.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -157,9 +191,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F2E2AA401B27345900AFEA5D /* XuniCoreKit.framework in Frameworks */, - F2BA19551B2883CF00F2B835 /* XuniGaugeKit.framework in Frameworks */, - F2E2AA421B27346E00AFEA5D /* XuniFlexGridKit.framework in Frameworks */, + 4C06B2CD1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Frameworks */, + 4C58D05A1CAC324100A6DF33 /* CoreLocation.framework in Frameworks */, + 4C06B2CB1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C06B2CF1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */, + 4C58D0581CAC305100A6DF33 /* MapKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -176,6 +212,7 @@ 4C219E701C91B30E0089B6B0 /* Images */ = { isa = PBXGroup; children = ( + 4C1C57051D26DED3007491EB /* flexgrid_headers.png */, 4C219E711C91B3240089B6B0 /* filter.png */, 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */, 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */, @@ -213,12 +250,197 @@ name = CustomMerging; sourceTree = ""; }; + 4C26BAA71D13058E00F65D77 /* Unbound */ = { + isa = PBXGroup; + children = ( + 4C26BAA81D1305AA00F65D77 /* UnboundSampleViewController.h */, + 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.m */, + ); + name = Unbound; + sourceTree = ""; + }; + 4C58D0431CA9583200A6DF33 /* ColumnDefinitions */ = { + isa = PBXGroup; + children = ( + F2E2AA271B27302300AFEA5D /* ColumnDefinitionsController.h */, + F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.m */, + ); + name = ColumnDefinitions; + sourceTree = ""; + }; + 4C58D0441CA95E2F00A6DF33 /* Data Model */ = { + isa = PBXGroup; + children = ( + F2E2AA3C1B2731B700AFEA5D /* CustomerData.h */, + F2E2AA3D1B2731B700AFEA5D /* CustomerData.m */, + ); + name = "Data Model"; + sourceTree = ""; + }; + 4C58D0451CA95E3A00A6DF33 /* Samples */ = { + isa = PBXGroup; + children = ( + 4C26BAA71D13058E00F65D77 /* Unbound */, + 4CA67B651CB1CFA700A1EE91 /* Filter */, + 4CA67B641CB1CE9D00A1EE91 /* FullTextFilter */, + 4CA67B631CB1B29800A1EE91 /* Freezing&Merging */, + 4CA67B621CB1B09E00A1EE91 /* Star Sizing */, + 4CA67B611CB1A5A600A1EE91 /* ColumnLayout */, + 4CA67B551CAFE5EB00A1EE91 /* OnDemand */, + 4C58D0561CAAA3FD00A6DF33 /* Grouping */, + 4C58D04D1CAA998100A6DF33 /* CustomCells */, + 4C58D04C1CAA967200A6DF33 /* ConditionalFormatting */, + 4C58D0461CA9639C00A6DF33 /* GettingStarted */, + 4C58D0491CA9B02F00A6DF33 /* EditingForm */, + 4C58D0481CA9AD7200A6DF33 /* EditConfirmation */, + 4C58D0471CA99EB400A6DF33 /* SelectionModes */, + 4C58D0431CA9583200A6DF33 /* ColumnDefinitions */, + 4C219E8F1C91C3ED0089B6B0 /* RowDetails */, + 4C219E951C91C8FA0089B6B0 /* CustomMerging */, + ); + name = Samples; + sourceTree = ""; + }; + 4C58D0461CA9639C00A6DF33 /* GettingStarted */ = { + isa = PBXGroup; + children = ( + F2BA19561B288F1600F2B835 /* GettingStartedController.h */, + F2BA19571B288F1600F2B835 /* GettingStartedController.m */, + ); + name = GettingStarted; + sourceTree = ""; + }; + 4C58D0471CA99EB400A6DF33 /* SelectionModes */ = { + isa = PBXGroup; + children = ( + F2E2AA2A1B27303700AFEA5D /* SelectionModesController.h */, + F2E2AA2B1B27303700AFEA5D /* SelectionModesController.m */, + ); + name = SelectionModes; + sourceTree = ""; + }; + 4C58D0481CA9AD7200A6DF33 /* EditConfirmation */ = { + isa = PBXGroup; + children = ( + F23675D11B59503000194040 /* EditConfirmationController.h */, + F23675D21B59503000194040 /* EditConfirmationController.m */, + ); + name = EditConfirmation; + sourceTree = ""; + }; + 4C58D0491CA9B02F00A6DF33 /* EditingForm */ = { + isa = PBXGroup; + children = ( + 4C63EDBC1BD94F6E00209E09 /* CustomerObjectEditor.h */, + 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.m */, + 4C435CBA1BD8D92B0099A651 /* EditingFormController.h */, + 4C435CBB1BD8D92B0099A651 /* EditingFormController.m */, + ); + name = EditingForm; + sourceTree = ""; + }; + 4C58D04C1CAA967200A6DF33 /* ConditionalFormatting */ = { + isa = PBXGroup; + children = ( + 4C435CAF1BD8C5F10099A651 /* ConditionalFormattingController.h */, + 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.m */, + ); + name = ConditionalFormatting; + sourceTree = ""; + }; + 4C58D04D1CAA998100A6DF33 /* CustomCells */ = { + isa = PBXGroup; + children = ( + F2E2AA2D1B27304C00AFEA5D /* CustomCellsController.h */, + F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.m */, + ); + name = CustomCells; + sourceTree = ""; + }; + 4C58D0561CAAA3FD00A6DF33 /* Grouping */ = { + isa = PBXGroup; + children = ( + F2E2AA301B27306300AFEA5D /* GroupingController.h */, + F2E2AA311B27306300AFEA5D /* GroupingController.m */, + ); + name = Grouping; + sourceTree = ""; + }; + 4CA67B551CAFE5EB00A1EE91 /* OnDemand */ = { + isa = PBXGroup; + children = ( + 4CA67B5C1CAFE76700A1EE91 /* SampleData.h */, + 4CA67B5D1CAFE76700A1EE91 /* SampleData.m */, + 4CA67B591CAFE64700A1EE91 /* YouTubeCollectionView.h */, + 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.m */, + 4C41F60C1BDE854900D3F97A /* OnDemandController.h */, + 4C41F60D1BDE854900D3F97A /* OnDemandController.m */, + ); + name = OnDemand; + sourceTree = ""; + }; + 4CA67B611CB1A5A600A1EE91 /* ColumnLayout */ = { + isa = PBXGroup; + children = ( + 4C63EDC41BDA1AED00209E09 /* ColumnReordererTableViewController.h */, + 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.m */, + 4C63EDBF1BD95A2700209E09 /* ColumnLayoutController.h */, + 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.m */, + ); + name = ColumnLayout; + sourceTree = ""; + }; + 4CA67B621CB1B09E00A1EE91 /* Star Sizing */ = { + isa = PBXGroup; + children = ( + 4C435CA31BD7AA1D0099A651 /* StarSizingController.h */, + 4C435CA41BD7AA1D0099A651 /* StarSizingController.m */, + ); + name = "Star Sizing"; + sourceTree = ""; + }; + 4CA67B631CB1B29800A1EE91 /* Freezing&Merging */ = { + isa = PBXGroup; + children = ( + 4C435CA81BD7FD930099A651 /* FrozenCellsController.h */, + 4C435CA91BD7FD930099A651 /* FrozenCellsController.m */, + ); + name = "Freezing&Merging"; + sourceTree = ""; + }; + 4CA67B641CB1CE9D00A1EE91 /* FullTextFilter */ = { + isa = PBXGroup; + children = ( + F2E2AA361B27308500AFEA5D /* FullTextFilterController.h */, + F2E2AA371B27308500AFEA5D /* FullTextFilterController.m */, + ); + name = FullTextFilter; + sourceTree = ""; + }; + 4CA67B651CB1CFA700A1EE91 /* Filter */ = { + isa = PBXGroup; + children = ( + F2E2AA331B27307300AFEA5D /* FilterController.h */, + F2E2AA341B27307300AFEA5D /* FilterController.m */, + F2CFF3BD1B7122BB00FE6FDF /* FilterData.h */, + F2CFF3BE1B7122BB00FE6FDF /* FilterData.m */, + 4CE266B21CB43C6000FD8F3C /* FilterGridViewController.h */, + 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.m */, + ); + name = Filter; + sourceTree = ""; + }; F2E2A9E41B27254C00AFEA5D = { isa = PBXGroup; children = ( - F2BA19541B2883CF00F2B835 /* XuniGaugeKit.framework */, - F2E2AA411B27346E00AFEA5D /* XuniFlexGridKit.framework */, - F2E2AA3F1B27345900AFEA5D /* XuniCoreKit.framework */, + 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.m */, + 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.m */, + 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.m */, + 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */, + 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */, + 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */, + 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */, + 4C58D0571CAC305100A6DF33 /* MapKit.framework */, F2E2A9EF1B27254C00AFEA5D /* FlexGrid101 */, F2E2AA091B27254E00AFEA5D /* FlexGrid101Tests */, F2E2A9EE1B27254C00AFEA5D /* Products */, @@ -237,59 +459,17 @@ F2E2A9EF1B27254C00AFEA5D /* FlexGrid101 */ = { isa = PBXGroup; children = ( - 4C219E951C91C8FA0089B6B0 /* CustomMerging */, - 4C219E8F1C91C3ED0089B6B0 /* RowDetails */, 4C219E701C91B30E0089B6B0 /* Images */, - F2CFF3BD1B7122BB00FE6FDF /* SharedFilterData.h */, - F2CFF3BE1B7122BB00FE6FDF /* SharedFilterData.m */, + 4C58D0441CA95E2F00A6DF33 /* Data Model */, + 4C58D0451CA95E3A00A6DF33 /* Samples */, F2E2A9F41B27254E00AFEA5D /* AppDelegate.h */, F2E2A9F51B27254E00AFEA5D /* AppDelegate.m */, - F2E2A9F71B27254E00AFEA5D /* ViewController.h */, - F2E2A9F81B27254E00AFEA5D /* ViewController.m */, + F23573691B44608100F300D7 /* License.h */, + F235736A1B44608100F300D7 /* License.m */, F2E2A9FA1B27254E00AFEA5D /* Main.storyboard */, F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */, F2E2A9FF1B27254E00AFEA5D /* LaunchScreen.xib */, F2E2A9F01B27254E00AFEA5D /* Supporting Files */, - F2E2AA241B27300A00AFEA5D /* GettingStartedController.h */, - F2E2AA251B27300A00AFEA5D /* GettingStartedController.m */, - F2E2AA271B27302300AFEA5D /* ColumnDefinitionsController.h */, - F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.m */, - F2E2AA2A1B27303700AFEA5D /* SelectionModesController.h */, - F2E2AA2B1B27303700AFEA5D /* SelectionModesController.m */, - F2E2AA2D1B27304C00AFEA5D /* CustomCellsController.h */, - F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.m */, - F2E2AA301B27306300AFEA5D /* GroupingController.h */, - F2E2AA311B27306300AFEA5D /* GroupingController.m */, - F2E2AA331B27307300AFEA5D /* FilterController.h */, - F2E2AA341B27307300AFEA5D /* FilterController.m */, - F2E2AA361B27308500AFEA5D /* FullTextFilterController.h */, - F2E2AA371B27308500AFEA5D /* FullTextFilterController.m */, - F2E2AA3C1B2731B700AFEA5D /* CustomerData.h */, - F2E2AA3D1B2731B700AFEA5D /* CustomerData.m */, - F2BA19561B288F1600F2B835 /* EditingController.h */, - F2BA19571B288F1600F2B835 /* EditingController.m */, - F2BA19921B2B1E3200F2B835 /* FilterFormController.h */, - F2BA19931B2B1E3200F2B835 /* FilterFormController.m */, - F23573691B44608100F300D7 /* License.h */, - F235736A1B44608100F300D7 /* License.m */, - F23675D11B59503000194040 /* EditConfirmationController.h */, - F23675D21B59503000194040 /* EditConfirmationController.m */, - 4C435CA31BD7AA1D0099A651 /* StarSizingController.h */, - 4C435CA41BD7AA1D0099A651 /* StarSizingController.m */, - 4C435CA81BD7FD930099A651 /* FrozenCellsController.h */, - 4C435CA91BD7FD930099A651 /* FrozenCellsController.m */, - 4C435CAF1BD8C5F10099A651 /* ConditionalFormattingController.h */, - 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.m */, - 4C435CBA1BD8D92B0099A651 /* EditingFormController.h */, - 4C435CBB1BD8D92B0099A651 /* EditingFormController.m */, - 4C63EDBC1BD94F6E00209E09 /* CustomerObjectEditor.h */, - 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.m */, - 4C63EDBF1BD95A2700209E09 /* ColumnLayoutController.h */, - 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.m */, - 4C63EDC41BDA1AED00209E09 /* ColumnReordererTableViewController.h */, - 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.m */, - 4C41F60C1BDE854900D3F97A /* OnDemandController.h */, - 4C41F60D1BDE854900D3F97A /* OnDemandController.m */, 4CA291041C07BD78008EA95D /* Localizable.strings */, ); path = FlexGrid101; @@ -331,6 +511,7 @@ F2E2A9E91B27254C00AFEA5D /* Sources */, F2E2A9EA1B27254C00AFEA5D /* Frameworks */, F2E2A9EB1B27254C00AFEA5D /* Resources */, + 4C6165221D18490E0044D30A /* Embed Frameworks */, ); buildRules = ( ); @@ -421,6 +602,7 @@ F2E2A9FE1B27254E00AFEA5D /* Images.xcassets in Resources */, 4C219E891C91B3240089B6B0 /* flexgrid_selection.png in Resources */, 4C219E8C1C91B3240089B6B0 /* input_form.png in Resources */, + 4C1C57061D26DED3007491EB /* flexgrid_headers.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -438,30 +620,34 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F2E2A9F91B27254E00AFEA5D /* ViewController.m in Sources */, 4C41F60E1BDE854900D3F97A /* OnDemandController.m in Sources */, F23675D31B59503000194040 /* EditConfirmationController.m in Sources */, F2E2AA351B27307300AFEA5D /* FilterController.m in Sources */, F2E2AA291B27302300AFEA5D /* ColumnDefinitionsController.m in Sources */, 4C219E981C91C90D0089B6B0 /* CustomMergingViewController.m in Sources */, - F2CFF3BF1B7122BB00FE6FDF /* SharedFilterData.m in Sources */, + F2CFF3BF1B7122BB00FE6FDF /* FilterData.m in Sources */, 4C63EDBE1BD94F6E00209E09 /* CustomerObjectEditor.m in Sources */, + 4CA67B5E1CAFE76700A1EE91 /* SampleData.m in Sources */, 4C435CA51BD7AA1E0099A651 /* StarSizingController.m in Sources */, - F2BA19941B2B1E3200F2B835 /* FilterFormController.m in Sources */, F2E2A9F61B27254E00AFEA5D /* AppDelegate.m in Sources */, 4C219E921C91C3FD0089B6B0 /* RowDetailsViewController.m in Sources */, F235736B1B44608100F300D7 /* License.m in Sources */, F2E2AA3E1B2731B700AFEA5D /* CustomerData.m in Sources */, + 4C393DCF1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.m in Sources */, + 4C26BAAA1D1305AA00F65D77 /* UnboundSampleViewController.m in Sources */, 4C435CBC1BD8D92B0099A651 /* EditingFormController.m in Sources */, F2E2AA2F1B27304C00AFEA5D /* CustomCellsController.m in Sources */, 4C63EDC11BD95A2700209E09 /* ColumnLayoutController.m in Sources */, 4C435CB11BD8C5F20099A651 /* ConditionalFormattingController.m in Sources */, + 4C393DD31D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.m in Sources */, 4C63EDC61BDA1AED00209E09 /* ColumnReordererTableViewController.m in Sources */, - F2E2AA261B27300A00AFEA5D /* GettingStartedController.m in Sources */, F2E2A9F31B27254E00AFEA5D /* main.m in Sources */, F2E2AA381B27308500AFEA5D /* FullTextFilterController.m in Sources */, F2E2AA321B27306300AFEA5D /* GroupingController.m in Sources */, - F2BA19581B288F1600F2B835 /* EditingController.m in Sources */, + 4C393DD21D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.m in Sources */, + F2BA19581B288F1600F2B835 /* GettingStartedController.m in Sources */, + 4CA67B5B1CAFE64700A1EE91 /* YouTubeCollectionView.m in Sources */, + 4CE266B41CB43C6000FD8F3C /* FilterGridViewController.m in Sources */, F2E2AA2C1B27303700AFEA5D /* SelectionModesController.m in Sources */, 4C435CAA1BD7FD930099A651 /* FrozenCellsController.m in Sources */, ); @@ -499,7 +685,7 @@ isa = PBXVariantGroup; children = ( F2E2A9FB1B27254E00AFEA5D /* Base */, - 4CA291001C07BD6F008EA95D /* ja */, + 4C58D04B1CA9B8EB00A6DF33 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -607,13 +793,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - ../../../Controls, - ../../../../Controls, - ); + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexGrid101/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(CONFIGURATION_BUILD_DIR)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -623,13 +806,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - ../../../Controls, - ../../../../Controls, - ); + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexGrid101/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(CONFIGURATION_BUILD_DIR)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/AppDelegate.m b/ObjectiveC/FlexGrid101/FlexGrid101/AppDelegate.m index 5b16806..7758f5f 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/AppDelegate.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/AppDelegate.m @@ -6,7 +6,7 @@ // #import "AppDelegate.h" -#import "XuniCoreKit/XuniCoreKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "License.h" @interface AppDelegate () diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib index d3eac8d..930cf10 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib +++ b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - + diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings index 12c8d18..7ebedcf 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings +++ b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings @@ -45,4 +45,11 @@ "Total" = "Total"; "Count" = "Count"; "Edit Columns" = "Edit Columns"; -"Done" = "Done"; \ No newline at end of file +"Done" = "Done"; +"Monday" = "Monday"; +"Tuesday" = "Tuesday"; +"Wednesday" = "Wednesday"; +"Thursday" = "Thursday"; +"Friday" = "Friday"; +"Saturday" = "Saturday"; +"Sunday" = "Sunday"; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard index 3ea60c4..aaf966d 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard +++ b/ObjectiveC/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - + - + + + @@ -16,33 +18,44 @@ + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + @@ -56,15 +69,15 @@ - + - + - + - - + + @@ -78,7 +91,7 @@ @@ -98,10 +111,9 @@ - - + @@ -116,7 +128,7 @@ - + @@ -129,13 +141,28 @@ + + + + + + + + + + + + + + + - + @@ -148,13 +175,27 @@ - + + + + + + + + + + + + + + + - + @@ -167,15 +208,30 @@ + + + + + + + + + + + + + + + - + - + @@ -186,36 +242,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + - - + + - + - - + + - - + + + + + + + + + + + + + + - + - + - + @@ -228,13 +352,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -247,18 +399,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + @@ -266,13 +457,27 @@ - + + + + + + + + + + + + + + + - + @@ -285,13 +490,33 @@ + + + + + + + + + + + + + + + + + + + + - + @@ -304,13 +529,28 @@ + + + + + + + + + + + + + + + - + @@ -323,14 +563,34 @@ + + + + + + + + + + + + + + + + + + + + - + @@ -344,6 +604,10 @@ + + + + @@ -658,9 +934,9 @@ - + - + @@ -672,13 +948,17 @@ - + + + + + - + @@ -701,20 +981,26 @@ + + + + - + + + - + @@ -729,7 +1015,7 @@ - + @@ -742,7 +1028,7 @@ - + @@ -755,13 +1041,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -794,7 +1124,7 @@ - + @@ -847,7 +1177,7 @@ - + @@ -900,7 +1230,7 @@ - + @@ -953,7 +1283,7 @@ - + @@ -1006,7 +1336,7 @@ - + @@ -1059,7 +1389,7 @@ - + @@ -1112,7 +1442,7 @@ - + @@ -1165,7 +1495,7 @@ - + @@ -1218,7 +1548,7 @@ - + @@ -1271,7 +1601,7 @@ - + @@ -1324,7 +1654,7 @@ - + @@ -1377,7 +1707,7 @@ - + @@ -1430,7 +1760,7 @@ - + @@ -1483,7 +1813,7 @@ - + @@ -1536,7 +1866,7 @@ - + @@ -1585,11 +1915,64 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1665,27 +2048,89 @@ - - + + + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1696,6 +2141,7 @@ + @@ -1703,7 +2149,4 @@ - - - diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnDefinitionsController.m b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnDefinitionsController.m index befdddf..941a319 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnDefinitionsController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnDefinitionsController.m @@ -6,66 +6,68 @@ // #import "ColumnDefinitionsController.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "CustomerData.h" @interface ColumnDefinitionsController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @implementation ColumnDefinitionsController - + - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.autoGenerateColumns = false; - FlexColumn *c1 = [[FlexColumn alloc] init]; - c1.binding = @"customerID"; - c1.header = @"ID"; - c1.width = 100; - FlexColumn *c2 = [[FlexColumn alloc] init]; - c2.binding = @"firstName"; - c2.header = @"First Name"; - FlexColumn *c3 = [[FlexColumn alloc] init]; - c3.binding = @"lastName"; - c3.header = @"Last Name"; - FlexColumn *c4 = [[FlexColumn alloc] init]; - c4.binding = @"orderTotal"; - c4.header = @"Order Total"; - c4.format = @"N1"; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.autoGenerateColumns = false; + + GridColumn *active = [[GridColumn alloc] init]; + active.binding = @"active"; + active.widthType = GridColumnWidthPixel; + active.width = 70; + [self.flex.columns addObject:active]; - FlexColumn *c5 = [[FlexColumn alloc] init]; - c5.binding = @"countryID"; - c5.header = @"Country"; + GridColumn *identifier = [[GridColumn alloc] init]; + identifier.binding = @"customerID"; + identifier.isReadOnly = true; + identifier.widthType = GridColumnWidthPixel; + identifier.width = 100; + [self.flex.columns addObject:identifier]; + GridColumn *firstName = [[GridColumn alloc] init]; + firstName.binding = @"firstName"; + [self.flex.columns addObject:firstName]; - [flex.columns addObject:c5]; - [flex.columns addObject:c2]; - [flex.columns addObject:c3]; - [flex.columns addObject:c4]; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.isReadOnly = false; + GridColumn *lastName = [[GridColumn alloc] init]; + lastName.binding = @"lastName"; + [self.flex.columns addObject:lastName]; + GridColumn *orderTotal = [[GridColumn alloc] init]; + orderTotal.binding = @"orderTotal"; + orderTotal.format = @"C2"; + [self.flex.columns addObject:orderTotal]; + + GridColumn *countryID = [[GridColumn alloc] init]; + countryID.binding = @"countryID"; + countryID.header = @"Country"; + countryID.horizontalAlignment = NSTextAlignmentLeft; NSMutableArray *items = [NSMutableArray arrayWithArray:[CustomerData defaultCountries]]; - c5.dataMap = [[FlexDataMap alloc] initWithArray:items selectedValuePath:@"identifier" displayMemberPath:@"title"]; + countryID.dataMap = [[GridDataMap alloc] initWithArray:items selectedValuePath:@"identifier" displayMemberPath:@"title"]; + [self.flex.columns addObject:countryID]; - flex.tag = 1; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; + GridColumn *lastOrderDate = [[GridColumn alloc] init]; + lastOrderDate.binding = @"lastOrderDate"; + [self.flex.columns addObject:lastOrderDate]; - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; + GridColumn *lastOrderTime = [[GridColumn alloc] init]; + lastOrderTime.binding = @"lastOrderDate"; + lastOrderTime.header = @"Last Order Time"; + NSDateFormatter* datefmt = [[NSDateFormatter alloc] init]; + [datefmt setDateFormat:@"hh:mm a"]; + lastOrderTime.formatter = datefmt; + [self.flex.columns addObject:lastOrderTime]; - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + self.flex.isReadOnly = false; } + @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.h b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.h index c8d5ce1..528ac47 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.h @@ -8,15 +8,12 @@ #import -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "CustomerData.h" #import "ColumnReordererTableViewController.h" @interface ColumnLayoutController : UIViewController -@property FlexGrid* flex; -@end - - -extern ColumnLayoutController* columnLayoutController; \ No newline at end of file +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.m b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.m index 0c6aa76..d250ff7 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnLayoutController.m @@ -12,37 +12,35 @@ @interface ColumnLayoutController () @end -ColumnLayoutController* columnLayoutController; - @implementation ColumnLayoutController { UIBarButtonItem *editButton; + UIBarButtonItem *restoreButton; + GridColumnCollection* columnsInitial; } - (void)viewDidLoad { - columnLayoutController = self; - [super viewDidLoad]; editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit Columns", nil) style:UIBarButtonItemStylePlain target:self action:@selector(editColumns:)]; - self.navigationItem.rightBarButtonItem = editButton; + restoreButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Restore", nil) style:UIBarButtonItemStylePlain target:self action:@selector(restoreColumns:)]; + + self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:editButton, nil]; self.columnList.hidden = true; - // Do any additional setup after loading the view, typically from a nib. - _flex = [[FlexGrid alloc] init]; - _flex.columnHeaderFont = [UIFont boldSystemFontOfSize:_flex.columnHeaderFont.pointSize]; - _flex.isReadOnly = true; - _flex.itemsSource = [CustomerData getCustomerData:100]; - _flex.tag = 1; - [_flex autoSizeColumns:0 to:_flex.columns.count-1]; - [self.view addSubview:_flex]; - [self.view sendSubviewToBack:_flex]; + + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + columnsInitial = [[GridColumnCollection alloc] init]; + for(int i = 0; i < self.flex.columns.count; i++) [columnsInitial addObject:self.flex.columns[i]]; + [self.flex autoSizeColumns:0 to:self.flex.columns.count-1]; } -(void)beginEditing { - [columnReorderTable.tableView reloadData]; + [((ColumnReordererTableViewController*)self.childViewControllers.firstObject).tableView reloadData]; self.columnList.alpha = 0; self.columnList.hidden = false; @@ -54,6 +52,7 @@ -(void)beginEditing editButton.title = NSLocalizedString(@"Done", nil); + self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:editButton, restoreButton, nil]; } -(void)endEditing @@ -66,8 +65,18 @@ -(void)endEditing editButton.title = NSLocalizedString(@"Edit Columns", nil); + self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:editButton, nil]; } +- (IBAction)restoreColumns:(id)sender +{ + [self.flex.columns removeAllObjects]; + for (int i = 0; i < columnsInitial.count; i++) { + [self.flex.columns addObject:columnsInitial[i]]; + } + + [((ColumnReordererTableViewController*)self.childViewControllers.firstObject).tableView reloadData]; +} - (IBAction)editColumns:(id)sender { @@ -82,18 +91,4 @@ - (IBAction)editColumns:(id)sender } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; - - _flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [_flex setNeedsDisplay]; -} - - @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.h b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.h index c1f98ed..7b8f438 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.h @@ -11,5 +11,3 @@ @interface ColumnReordererTableViewController : UITableViewController @end - -extern ColumnReordererTableViewController* columnReorderTable; \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.m b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.m index 2e09fc3..4c9a93b 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.m @@ -11,31 +11,18 @@ @interface ColumnReordererTableViewController () @end -ColumnReordererTableViewController* columnReorderTable; @implementation ColumnReordererTableViewController - (void)viewDidLoad { - columnReorderTable = self; - [super viewDidLoad]; - - - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; - self.editing = true; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } -#pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; @@ -43,7 +30,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - FlexGrid* fg = columnLayoutController.flex; + FlexGrid* fg = ((ColumnLayoutController*)self.parentViewController).flex; return fg.columns.count; } @@ -51,65 +38,34 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CELL" forIndexPath:indexPath]; - FlexGrid* fg = columnLayoutController.flex; - FlexColumn* col = [fg.columns objectAtIndex:indexPath.row]; + FlexGrid* fg = ((ColumnLayoutController*)self.parentViewController).flex; + GridColumn* col = [fg.columns objectAtIndex:indexPath.row]; cell.textLabel.text = col.header; - // Configure the cell... - return cell; } - -/* -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the specified item to be editable. - return YES; -} -*/ - - -// Override to support editing the table view. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - FlexGrid* fg = columnLayoutController.flex; + FlexGrid* fg = ((ColumnLayoutController*)self.parentViewController).flex; [fg.columns removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; } else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } - -// Override to support rearranging the table view. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { - FlexGrid* fg = columnLayoutController.flex; - FlexColumn* fc = [fg.columns objectAtIndex:fromIndexPath.row]; + FlexGrid* fg = ((ColumnLayoutController*)self.parentViewController).flex; + GridColumn* fc = [fg.columns objectAtIndex:fromIndexPath.row]; [fg.columns removeObjectAtIndex:fromIndexPath.row]; [fg.columns insertObject:fc atIndex:toIndexPath.row]; } - -// Override to support conditional rearranging of the table view. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the item to be re-orderable. return YES; } - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.h b/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.h index ae34c45..d00b8f8 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.h @@ -7,10 +7,9 @@ #import -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" -@interface ConditionalFormattingController : UIViewController +@interface ConditionalFormattingController: UIViewController --(bool)formatItem:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range inContext:(CGContextRef)context; @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.m b/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.m index a388e73..a8aa2c1 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ConditionalFormattingController.m @@ -10,6 +10,7 @@ @interface ConditionalFormattingController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -17,88 +18,88 @@ @implementation ConditionalFormattingController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - - flex.autoGenerateColumns = false; - FlexColumn *c1 = [[FlexColumn alloc] init]; + + self.flex.autoGenerateColumns = false; + GridColumn *c1 = [[GridColumn alloc] init]; c1.binding = @"firstName"; - c1.header = NSLocalizedString(@"First Name", nil); - c1.width = 100; - FlexColumn *c2 = [[FlexColumn alloc] init]; + c1.header = NSLocalizedString(@"First Name", nil); + c1.width = 100; + GridColumn *c2 = [[GridColumn alloc] init]; c2.binding = @"lastName"; - c2.header = NSLocalizedString(@"Last Name", nil); - FlexColumn *c3 = [[FlexColumn alloc] init]; + c2.header = NSLocalizedString(@"Last Name", nil); + GridColumn *c3 = [[GridColumn alloc] init]; c3.binding = @"orderTotal"; - c3.header = NSLocalizedString(@"Total", nil); - c3.format = @"C"; - FlexColumn *c4 = [[FlexColumn alloc] init]; + c3.header = NSLocalizedString(@"Total", nil); + c3.format = @"C"; + GridColumn *c4 = [[GridColumn alloc] init]; c4.binding = @"orderCount"; - c4.header = NSLocalizedString(@"Count", nil); - c4.format = @"N1"; - [flex.columns addObject:c1]; - [flex.columns addObject:c2]; - [flex.columns addObject:c3]; - [flex.columns addObject:c4]; + c4.header = NSLocalizedString(@"Count", nil); + c4.format = @"N1"; + [self.flex.columns addObject:c1]; + [self.flex.columns addObject:c2]; + [self.flex.columns addObject:c3]; + [self.flex.columns addObject:c4]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.isReadOnly = true; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - flex.delegate = self; + GridColumn *countryID = [[GridColumn alloc] init]; + countryID.binding = @"countryID"; + countryID.header = @"Country"; + countryID.horizontalAlignment = NSTextAlignmentLeft; + NSMutableArray *items = [NSMutableArray arrayWithArray:[CustomerData defaultCountries]]; + countryID.dataMap = [[GridDataMap alloc] initWithArray:items selectedValuePath:@"identifier" displayMemberPath:@"title"]; + [self.flex.columns addObject:countryID]; - [self.view addSubview:flex]; -} + GridColumn *lastOrderDate = [[GridColumn alloc] init]; + lastOrderDate.binding = @"lastOrderDate"; + [self.flex.columns addObject:lastOrderDate]; + + GridColumn *lastOrderTime = [[GridColumn alloc] init]; + lastOrderTime.binding = @"lastOrderDate"; + lastOrderTime.header = @"Last Order Time"; + NSDateFormatter* datefmt = [[NSDateFormatter alloc] init]; + [datefmt setDateFormat:@"hh:mm a"]; + lastOrderTime.formatter = datefmt; + [self.flex.columns addObject:lastOrderTime]; --(bool)formatItem:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range inContext:(CGContextRef)context { - if (panel.cellType == FlexCellTypeCell) { - FlexGrid *g = (FlexGrid*)[self.view viewWithTag:1]; - FlexColumn *col = [g.columns objectAtIndex:range.col]; - - if ([col.binding isEqualToString:@"orderCount"]) { - NSNumber *n = (NSNumber*)[panel getCellDataForRow:range.row inColumn:range.col formatted:NO]; - if (n != nil) { - if (n.integerValue >= 50) { - CGRect r = [panel getCellRectForRow:range.row inColumn:range.col]; - CGContextSetFillColorWithColor(context, [UIColor colorWithRed:0.15 green:0.31 blue:0.07 alpha:1.0].CGColor); - CGContextFillRect(context, r); - } - else if (n.integerValue < 50) { - CGRect r = [panel getCellRectForRow:range.row inColumn:range.col]; - CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor); - CGContextFillRect(context, r); + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + + [self.flex.flexGridFormatItem addHandler:^(XuniEventContainer *eventContainer) { + if (eventContainer.eventArgs.panel.cellType == GridCellTypeCell) { + FlexGrid *g = _flex; + GridColumn *col = [g.columns objectAtIndex:eventContainer.eventArgs.col]; + + if ([col.binding isEqualToString:@"orderCount"]) { + NSNumber *n = (NSNumber *)[eventContainer.eventArgs.panel getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:NO]; + if (n != nil) { + if (n.integerValue >= 50) { + CGRect r = [eventContainer.eventArgs.panel getCellRectForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; + CGContextSetFillColorWithColor(eventContainer.eventArgs.context, [UIColor colorWithRed:0.15 green:0.31 blue:0.07 alpha:1.0].CGColor); + CGContextFillRect(eventContainer.eventArgs.context, r); + } else if (n.integerValue < 50) { + CGRect r = [eventContainer.eventArgs.panel getCellRectForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; + CGContextSetFillColorWithColor(eventContainer.eventArgs.context, [UIColor redColor].CGColor); + CGContextFillRect(eventContainer.eventArgs.context, r); + } + [eventContainer.eventArgs.panel.textAttributes setValue:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]; } - [panel.textAttributes setValue:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]; } - } - - if ([col.binding isEqualToString:@"orderTotal"]) { - NSNumber *n = (NSNumber*)[panel getCellDataForRow:range.row inColumn:range.col formatted:NO]; - if (n != nil) { - if (n.integerValue >= 5000) { - [panel.textAttributes setValue:[UIColor colorWithRed:0.15 green:0.31 blue:0.07 alpha:1.0] forKey:NSForegroundColorAttributeName]; - } - else if (n.integerValue < 5000) { - [panel.textAttributes setValue:[UIColor redColor] forKey:NSForegroundColorAttributeName]; + + if ([col.binding isEqualToString:@"orderTotal"]) { + NSNumber *n = (NSNumber *)[eventContainer.eventArgs.panel getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:NO]; + if (n != nil) { + if (n.integerValue >= 5000) { + [eventContainer.eventArgs.panel.textAttributes setValue:[UIColor colorWithRed:0.15 green:0.31 blue:0.07 alpha:1.0] forKey:NSForegroundColorAttributeName]; + } else if (n.integerValue < 5000) { + [eventContainer.eventArgs.panel.textAttributes setValue:[UIColor redColor] forKey:NSForegroundColorAttributeName]; + } } } } - } - return false; -} + eventContainer.eventArgs.cancel = false; + + } forObject:self]; -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; - - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; } @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.h b/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.h index 7a3b998..8ab902a 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.h @@ -6,10 +6,8 @@ // #import -#import +#import -@interface CustomCellsController : UIViewController - --(bool)formatItem:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range inContext:(CGContextRef)context; +@interface CustomCellsController : UIViewController @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.m b/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.m index de7cc1c..7e06cd9 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomCellsController.m @@ -6,11 +6,12 @@ // #import "CustomCellsController.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" -#import "XuniGaugeKit/XuniGaugeKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" +#import "XuniGaugeDynamicKit/XuniGaugeDynamicKit.h" #import "CustomerData.h" @interface CustomCellsController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -18,109 +19,87 @@ @implementation CustomCellsController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.autoGenerateColumns = false; - flex.isReadOnly = true; - flex.delegate = self; - flex.tag = 1; - - FlexColumn *c1 = [[FlexColumn alloc] init]; - c1.header = NSLocalizedString(@"First Name", nil); + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.autoGenerateColumns = false; + self.flex.isReadOnly = true; + self.flex.selectionMode = GridSelectionModeRow; + + GridColumn *c1 = [[GridColumn alloc] init]; + c1.header = NSLocalizedString(@"First Name", nil); c1.binding = @"firstName"; - FlexColumn *c2 = [[FlexColumn alloc] init]; - c2.header = NSLocalizedString(@"Last Name", nil); + GridColumn *c2 = [[GridColumn alloc] init]; + c2.header = NSLocalizedString(@"Last Name", nil); c2.binding = @"lastName"; - FlexColumn *c3 = [[FlexColumn alloc] init]; - c3.header = NSLocalizedString(@"Total Orders", nil); + GridColumn *c3 = [[GridColumn alloc] init]; + c3.header = NSLocalizedString(@"Total Orders", nil); c3.binding = @"orderTotal"; - [flex.columns addObject:c1]; - [flex.columns addObject:c2]; - [flex.columns addObject:c3]; - - flex.selectionMode = FlexSelectionModeNone; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - [self starSizing:flex]; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} + [self.flex.columns addObject:c1]; + [self.flex.columns addObject:c2]; + [self.flex.columns addObject:c3]; -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + [self starSizing:self.flex]; - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; - - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; -} - --(void)starSizing:(FlexGrid*)g{ - for (int i = 0; i < g.columns.count; i++) { - FlexColumn *c = [g.columns objectAtIndex:i]; - c.widthType = FlexColumnWidthStar; - c.width = (i == 0) ? 5 : (i == 3) ? 3 : 4; - } -} --(bool)formatItem:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range inContext:(CGContextRef)context{ - bool result = NO; - FlexGrid *g = (FlexGrid*)[self.view viewWithTag:1]; - FlexColumn *col = [g.columns objectAtIndex:range.col]; + [self.flex.flexGridFormatItem addHandler:^(XuniEventContainer *eventContainer) { + eventContainer.eventArgs.cancel = NO; + FlexGrid *g = self.flex; + GridColumn *col = g.columns[eventContainer.eventArgs.col]; if ([col.binding isEqualToString:@"orderTotal"]) { - NSObject *v = [panel getCellDataForRow:range.row inColumn:range.col formatted:false]; + NSObject *v = [eventContainer.eventArgs.panel getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:false]; if (v != nil) { - if (![v.description isEqual: NSLocalizedString(@"Total Orders", nil)]){ + if (![v.description isEqual:NSLocalizedString(@"Total Orders", nil)]) { XuniRadialGauge *radialGauge = [[XuniRadialGauge alloc] init]; - XuniGaugeRange *lower = [[XuniGaugeRange alloc] initWithGauge:radialGauge]; - lower.min = 0; - lower.max = 40; + XuniGaugeRange *lower = [[XuniGaugeRange alloc] initWithGauge:radialGauge]; + lower.min = 0; + lower.max = 40; lower.color = [UIColor colorWithRed:0.133 green:0.694 blue:0.298 alpha:1]; XuniGaugeRange *middle = [[XuniGaugeRange alloc] initWithGauge:radialGauge]; - middle.min = 40; - middle.max = 80; + middle.min = 40; + middle.max = 80; middle.color = [UIColor colorWithRed:1 green:0.502 blue:0.502 alpha:1]; XuniGaugeRange *upper = [[XuniGaugeRange alloc] initWithGauge:radialGauge]; - upper.min = 80; - upper.max = 100; + upper.min = 80; + upper.max = 100; upper.color = [UIColor colorWithRed:0 green:0.635 blue:0.91 alpha:1]; [radialGauge.ranges addObject:lower]; [radialGauge.ranges addObject:middle]; [radialGauge.ranges addObject:upper]; - radialGauge.showText = XuniShowTextNone; - radialGauge.thickness = 0.6; - radialGauge.min = 0; - radialGauge.max = 100; + radialGauge.backgroundColor = [UIColor clearColor]; + radialGauge.showText = XuniShowTextNone; + radialGauge.thickness = 0.6; + radialGauge.min = 0; + radialGauge.max = 100; radialGauge.loadAnimation = nil; - radialGauge.value =[v.description doubleValue]*(100.0/90000.0); - radialGauge.showRanges = false; + radialGauge.value = [v.description doubleValue]*(100.0/90000.0); + radialGauge.showRanges = false; - CGRect r = [panel getCellRectForRow:range.row inColumn:range.col]; - - r.size.width-=4; - r.size.height-=4; - - r.origin.x+=2; - r.origin.y+=2; + CGRect r = [eventContainer.eventArgs.panel getCellRectForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; XuniRect *t = [[XuniRect alloc] initLeft:0 top:0 width:r.size.width height:r.size.height]; radialGauge.rectGauge = t; - radialGauge.frame = CGRectMake(0, 0, r.size.width, r.size.height); - + radialGauge.frame = CGRectMake(0, 0, r.size.width, r.size.height); + UIImage *image = [[UIImage alloc] init]; image = [UIImage imageWithData:[radialGauge getImage]]; [image drawInRect:r]; - result = YES; + eventContainer.eventArgs.cancel = YES; } } } - return result; + + } forObject:self]; + } + +- (void)starSizing:(FlexGrid *)g { + for (int i = 0; i < g.columns.count; i++) { + GridColumn *c = [g.columns objectAtIndex:i]; + c.widthType = GridColumnWidthStar; + c.width = (i == 0) ? 5 : (i == 3) ? 3 : 4; + } +} + @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomMergingViewController.m b/ObjectiveC/FlexGrid101/FlexGrid101/CustomMergingViewController.m index ab3e499..cf45009 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomMergingViewController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomMergingViewController.m @@ -5,7 +5,7 @@ // Copyright © 2016 GrapeCity. All rights reserved. // -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "CustomMergingViewController.h" @interface CustomMergingViewController () @@ -15,38 +15,141 @@ @interface CustomMergingViewController () @end +@interface CustomMergingFlexGrid: FlexGrid + +@end + +@implementation CustomMergingFlexGrid + +- (void)prepareForInterfaceBuilder { + self.columnHeaderFont = [UIFont boldSystemFontOfSize:self.columnHeaderFont.pointSize]; + + NSArray* weekdays = @[@"Monday", @"Tuesday", @"Wednesday", @"Thursday", @"Friday", @"Saturday", @"Sunday"]; + + for (NSString* dayName in weekdays) { + GridColumn *c1 = [[GridColumn alloc] init]; + c1.header = dayName; + c1.widthType = GridColumnWidthStar; + c1.width = 1; + c1.dataType = XuniDataTypeString; + c1.minWidth = 120; + c1.horizontalAlignment = NSTextAlignmentCenter; + c1.headerHorizontalAlignment = NSTextAlignmentCenter; + c1.allowMerging = true; + [self.columns addObject:c1]; + } + + NSArray* timespans = @[@"12", @"13", @"14", @"15", @"16", @"17", @"18"]; + for (NSString* timeSpan in timespans) { + GridRow* r1 = [[GridRow alloc] init]; + [self.rows addObject:r1]; + + [self.rowHeaders setCellData:[NSString stringWithFormat:@"%@:00", timeSpan] forRow:(int)[self.rows indexOfObject:r1] inColumn:0]; + } + + [self.columnHeaders.rows insertObject:[[GridRow alloc]init] atIndex:0]; + + self.columnHeaders.rows[0].allowMerging = true; + + self.columnHeaders[0][0] = @"Weekday"; + self.columnHeaders[0][1] = @"Weekday"; + self.columnHeaders[0][2] = @"Weekday"; + self.columnHeaders[0][3] = @"Weekday"; + self.columnHeaders[0][4] = @"Weekday"; + self.columnHeaders[0][5] = @"Weekend"; + self.columnHeaders[0][6] = @"Weekend"; + + [self setCellData:@"Walker" forRow:0 inColumn:0]; + [self setCellData:@"Morning Show" forRow:0 inColumn:1]; + [self setCellData:@"Morning Show" forRow:0 inColumn:2]; + [self setCellData:@"Sports" forRow:0 inColumn:3]; + [self setCellData:@"Weather" forRow:0 inColumn:4]; + [self setCellData:@"N/A" forRow:0 inColumn:5]; + [self setCellData:@"N/A" forRow:0 inColumn:6]; + [self setCellData:@"N/A" forRow:1 inColumn:5]; + [self setCellData:@"N/A" forRow:1 inColumn:6]; + [self setCellData:@"N/A" forRow:2 inColumn:5]; + [self setCellData:@"N/A" forRow:2 inColumn:6]; + [self setCellData:@"N/A" forRow:3 inColumn:5]; + [self setCellData:@"N/A" forRow:3 inColumn:6]; + [self setCellData:@"N/A" forRow:4 inColumn:5]; + [self setCellData:@"N/A" forRow:4 inColumn:6]; + [self setCellData:@"Today Show" forRow:1 inColumn:0]; + [self setCellData:@"Today Show" forRow:1 inColumn:1]; + [self setCellData:@"Today Show" forRow:2 inColumn:0]; + [self setCellData:@"Today Show" forRow:2 inColumn:1]; + [self setCellData:@"Sesame Street" forRow:1 inColumn:2]; + [self setCellData:@"Football" forRow:1 inColumn:3]; + [self setCellData:@"Football" forRow:2 inColumn:3]; + [self setCellData:@"Market Watch" forRow:1 inColumn:4]; + [self setCellData:@"Kids Zone" forRow:2 inColumn:2]; + [self setCellData:@"Soap Opera" forRow:2 inColumn:4]; + [self setCellData:@"News" forRow:3 inColumn:0]; + [self setCellData:@"News" forRow:3 inColumn:1]; + [self setCellData:@"News" forRow:3 inColumn:2]; + [self setCellData:@"News" forRow:3 inColumn:3]; + [self setCellData:@"News" forRow:3 inColumn:4]; + [self setCellData:@"News" forRow:4 inColumn:0]; + [self setCellData:@"News" forRow:4 inColumn:1]; + [self setCellData:@"News" forRow:4 inColumn:2]; + [self setCellData:@"News" forRow:4 inColumn:3]; + [self setCellData:@"News" forRow:4 inColumn:4]; + [self setCellData:@"Weel of Fortune" forRow:5 inColumn:0]; + [self setCellData:@"Weel of Fortune" forRow:5 inColumn:1]; + [self setCellData:@"Weel of Fortune" forRow:5 inColumn:2]; + [self setCellData:@"Jeopardy" forRow:5 inColumn:3]; + [self setCellData:@"Jeopardy" forRow:5 inColumn:4]; + [self setCellData:@"Movie" forRow:5 inColumn:5]; + [self setCellData:@"Movie" forRow:6 inColumn:5]; + [self setCellData:@"Golf" forRow:5 inColumn:6]; + [self setCellData:@"Golf" forRow:6 inColumn:6]; + [self setCellData:@"Night Show" forRow:6 inColumn:0]; + [self setCellData:@"Night Show" forRow:6 inColumn:1]; + [self setCellData:@"Sports" forRow:6 inColumn:2]; + [self setCellData:@"Big Brother" forRow:6 inColumn:3]; + [self setCellData:@"Big Brother" forRow:6 inColumn:4]; + + self.allowMerging = GridAllowMergingAll; + + [self autoSizeColumn:0 header:true]; + +} +@end + @implementation CustomMergingViewController - (void)viewDidLoad { [super viewDidLoad]; - self.grid.selectionMode = FlexSelectionModeCell; + self.grid.selectionMode = GridSelectionModeCell; self.grid.isReadOnly = true; + self.grid.columnHeaderFont = [UIFont boldSystemFontOfSize:self.grid.columnHeaderFont.pointSize]; NSArray* weekdays = @[@"Monday", @"Tuesday", @"Wednesday", @"Thursday", @"Friday", @"Saturday", @"Sunday"]; for (NSString* dayName in weekdays) { - FlexColumn *c1 = [[FlexColumn alloc] init]; + GridColumn *c1 = [[GridColumn alloc] init]; c1.header = dayName; - c1.widthType = FlexColumnWidthStar; + c1.widthType = GridColumnWidthStar; c1.width = 1; c1.dataType = XuniDataTypeString; c1.minWidth = 120; + c1.horizontalAlignment = NSTextAlignmentCenter; + c1.headerHorizontalAlignment = NSTextAlignmentCenter; c1.allowMerging = true; [self.grid.columns addObject:c1]; } NSArray* timespans = @[@"12", @"13", @"14", @"15", @"16", @"17", @"18"]; for (NSString* timeSpan in timespans) { - FlexRow* r1 = [[FlexRow alloc] init]; + GridRow* r1 = [[GridRow alloc] init]; [self.grid.rows addObject:r1]; [self.grid.rowHeaders setCellData:[NSString stringWithFormat:@"%@:00", timeSpan] forRow:(int)[self.grid.rows indexOfObject:r1] inColumn:0]; } - [self.grid.flexGridSelectionChanged addHandler:^(NSObject *sender, XuniEventArgs *args) { - FlexCellRangeEventArgs *e = (FlexCellRangeEventArgs *)args; - int r = e.row; - int c = e.col; + [self.grid.flexGridSelectionChanged addHandler:^(XuniEventContainer *eventContainer) { + int r = eventContainer.eventArgs.row; + int c = eventContainer.eventArgs.col; NSString* thisShow = [self.grid getCellDataForRow:r inColumn:c formatted:YES].description; @@ -56,7 +159,7 @@ - (void)viewDidLoad { for(int cc = 0; cc<7; cc++) { - NSString* day = ((FlexColumn*)[self.grid.columns objectAtIndex:cc]).header; + NSString* day = ((GridColumn*)[self.grid.columns objectAtIndex:cc]).header; NSString* spanStart = nil, *spanEnd = nil; for(int cr = 0; cr < 7; cr++) { @@ -81,9 +184,21 @@ - (void)viewDidLoad { } self.showTimetable.text = timetable; - + } forObject:self]; + [self.grid.columnHeaders.rows insertObject:[[GridRow alloc]init] atIndex:0]; + + self.grid.columnHeaders.rows[0].allowMerging = true; + + self.grid.columnHeaders[0][0] = @"Weekday"; + self.grid.columnHeaders[0][1] = @"Weekday"; + self.grid.columnHeaders[0][2] = @"Weekday"; + self.grid.columnHeaders[0][3] = @"Weekday"; + self.grid.columnHeaders[0][4] = @"Weekday"; + self.grid.columnHeaders[0][5] = @"Weekend"; + self.grid.columnHeaders[0][6] = @"Weekend"; + [self.grid setCellData:@"Walker" forRow:0 inColumn:0]; [self.grid setCellData:@"Morning Show" forRow:0 inColumn:1]; [self.grid setCellData:@"Morning Show" forRow:0 inColumn:2]; @@ -119,9 +234,9 @@ - (void)viewDidLoad { [self.grid setCellData:@"News" forRow:4 inColumn:2]; [self.grid setCellData:@"News" forRow:4 inColumn:3]; [self.grid setCellData:@"News" forRow:4 inColumn:4]; - [self.grid setCellData:@"Weel of Fortune" forRow:5 inColumn:0]; - [self.grid setCellData:@"Weel of Fortune" forRow:5 inColumn:1]; - [self.grid setCellData:@"Weel of Fortune" forRow:5 inColumn:2]; + [self.grid setCellData:@"Wheel of Fortune" forRow:5 inColumn:0]; + [self.grid setCellData:@"Wheel of Fortune" forRow:5 inColumn:1]; + [self.grid setCellData:@"Wheel of Fortune" forRow:5 inColumn:2]; [self.grid setCellData:@"Jeopardy" forRow:5 inColumn:3]; [self.grid setCellData:@"Jeopardy" forRow:5 inColumn:4]; [self.grid setCellData:@"Movie" forRow:5 inColumn:5]; @@ -134,25 +249,12 @@ - (void)viewDidLoad { [self.grid setCellData:@"Big Brother" forRow:6 inColumn:3]; [self.grid setCellData:@"Big Brother" forRow:6 inColumn:4]; - self.grid.allowMerging = FlexGridAllowMergingCells; + self.grid.allowMerging = GridAllowMergingAll; [self.grid autoSizeColumn:0 header:true]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.h b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.h index 12032ec..fff676b 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.h @@ -14,12 +14,15 @@ @interface CustomerData : NSObject @property NSUInteger customerID; -@property NSString *firstName, *lastName, *address, *city; +@property NSString *firstName, *lastName; +@property (nonatomic, readonly) NSString *name; +@property NSString *address, *city; @property NSUInteger countryID; @property NSString *country, *postalCode, *email; @property NSDate *lastOrderDate; @property NSUInteger orderCount; @property double orderTotal; +@property (nonatomic, readonly) double orderAverage; @property BOOL active; -(id)initWithCustomerID:(NSUInteger)customerID countryID:(NSUInteger)countryID firstName:(NSString *)first lastName:(NSString *) last address:(NSString *) address city:(NSString *) city country:(NSString *) country postalCode:(NSString *) postalCode lastOrderDate:(NSDate *) lastOrderDate orderCount:(NSUInteger) orderCount orderTotal:(double)orderTotal active: (BOOL) active; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.m b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.m index f7b1edf..ec906e6 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerData.m @@ -33,6 +33,16 @@ -(id)initWithCustomerID:(NSUInteger)customerID countryID:(NSUInteger)countryID f return self; } +-(double)orderAverage +{ + return self.orderTotal / ((double)self.orderCount); +} + +-(NSString *)name +{ + return [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName]; +} + +(NSUInteger) generateRandom: (NSUInteger) max{ return arc4random()% max; @@ -87,7 +97,7 @@ +(NSMutableArray *) getCustomerData: (NSInteger) total{ NSMutableArray *array = [[NSMutableArray alloc] init]; for (int i = 0; i < total; i++) { - dateComps.day = ([CustomerData generateRandom:1000] * -1); + dateComps.second = ([CustomerData generateRandom:100000000] * -1); previousDate = [calendar dateByAddingComponents:dateComps toDate:now options:false]; CustomerData *customer = [[CustomerData alloc] init]; customer.customerID = i; @@ -96,11 +106,11 @@ +(NSMutableArray *) getCustomerData: (NSInteger) total{ customer.firstName = [firstNamesArray objectAtIndex:[CustomerData generateRandom:[firstNamesArray count]]]; customer.lastName = [lastNamesArray objectAtIndex:[CustomerData generateRandom:[lastNamesArray count]]]; customer.city = [citiesArray objectAtIndex:[CustomerData generateRandom:[citiesArray count]]]; - customer.address = [streetsArray objectAtIndex:[CustomerData generateRandom:[streetsArray count]]]; + customer.address = [NSString stringWithFormat:@"%i %@", (int)[CustomerData generateRandom:500], [streetsArray objectAtIndex:[CustomerData generateRandom:[streetsArray count]]]]; customer.postalCode = [NSString stringWithFormat:@"%lu%lu%lu%lu%lu", [self generateRandom:9], [self generateRandom:9],[self generateRandom:9],[self generateRandom:9],[self generateRandom:9]]; customer.lastOrderDate = previousDate; customer.email = [emailsArray objectAtIndex:[CustomerData generateRandom:[emailsArray count]]]; - customer.orderCount = [self generateRandom:100]; + customer.orderCount = [self generateRandom:100]+1; customer.orderTotal = [self generateRandom:100]/100.0+[self generateRandom:90000]; customer.active = [CustomerData generateRandomBool]; [array addObject:customer]; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.h b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.h index 1415229..f9cb727 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.h @@ -10,5 +10,3 @@ @interface CustomerObjectEditor : UITableViewController -(void) initObject; @end - -extern CustomerObjectEditor* objEdit; \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.m b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.m index ea290f3..e6ccf9d 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/CustomerObjectEditor.m @@ -7,7 +7,6 @@ #import "CustomerObjectEditor.h" #import "EditingFormController.h" -CustomerObjectEditor* objEdit; @interface CustomerObjectEditor () @property (weak, nonatomic) IBOutlet UITextField *firstNameEdit; @@ -16,138 +15,53 @@ @interface CustomerObjectEditor () @property (weak, nonatomic) IBOutlet UITextField *cityEdit; @property (weak, nonatomic) IBOutlet UITextField *addressEdit; @property (weak, nonatomic) IBOutlet UITextField *emailEdit; - @end @implementation CustomerObjectEditor --(void) initObject -{ - self.firstNameEdit.text = edited.firstName; - - self.secondNameEdit.text = edited.lastName; - self.countryEdit.text = edited.country; - self.cityEdit.text = edited.city; - self.addressEdit.text = edited.address; - self.emailEdit.text = edited.email; +- (void)initObject { + EditingFormController* efc = (EditingFormController*)self.parentViewController; - self.firstNameEdit.placeholder = self.firstNameEdit.text; + self.firstNameEdit.text = efc.edited.firstName; + + self.secondNameEdit.text = efc.edited.lastName; + self.countryEdit.text = efc.edited.country; + self.cityEdit.text = efc.edited.city; + self.addressEdit.text = efc.edited.address; + self.emailEdit.text = efc.edited.email; + + self.firstNameEdit.placeholder = self.firstNameEdit.text; self.secondNameEdit.placeholder = self.secondNameEdit.text; - self.countryEdit.placeholder = self.countryEdit.text; - self.cityEdit.placeholder = self.cityEdit.text; - self.addressEdit.placeholder = self.addressEdit.text; - self.emailEdit.placeholder = self.emailEdit.text; + self.countryEdit.placeholder = self.countryEdit.text; + self.cityEdit.placeholder = self.cityEdit.text; + self.addressEdit.placeholder = self.addressEdit.text; + self.emailEdit.placeholder = self.emailEdit.text; } --(void)tableView:(UITableView *)tableView -willDisplayCell:(UITableViewCell *)cell -forRowAtIndexPath:(NSIndexPath *)indexPath -{ +- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor clearColor]]; } -- (void)viewDidLoad { - [super viewDidLoad]; +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - objEdit = self; + EditingFormController* efc = (EditingFormController*)self.parentViewController; - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.row == [self tableView:tableView numberOfRowsInSection:indexPath.section]-2) - { + if (indexPath.row == [self tableView:tableView numberOfRowsInSection:indexPath.section]-2) { [efc cancel]; - } else if (indexPath.row == [self tableView:tableView numberOfRowsInSection:indexPath.section]-3) - { - edited.firstName = objEdit.firstNameEdit.text; - edited.lastName = objEdit.secondNameEdit.text; - edited.country = objEdit.countryEdit.text; - edited.city = objEdit.cityEdit.text; - edited.address = objEdit.addressEdit.text; - edited.email = objEdit.emailEdit.text; + } else if (indexPath.row == [self tableView:tableView numberOfRowsInSection:indexPath.section]-3) { + efc.edited.firstName = self.firstNameEdit.text; + efc.edited.lastName = self.secondNameEdit.text; + efc.edited.country = self.countryEdit.text; + efc.edited.city = self.cityEdit.text; + efc.edited.address = self.addressEdit.text; + efc.edited.email = self.emailEdit.text; [efc confirm]; } [self.tableView deselectRowAtIndexPath:indexPath animated:false]; } + - (IBAction)endEdit:(id)sender { [self resignFirstResponder]; } -#pragma mark - Table view data source - -/*- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { -#warning Incomplete implementation, return the number of sections - return 0; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { -#warning Incomplete implementation, return the number of rows - return 0; -}*/ - -/* -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath]; - - // Configure the cell... - - return cell; -} -*/ - -/* -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the specified item to be editable. - return YES; -} -*/ - -/* -// Override to support editing the table view. -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - } else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } -} -*/ - -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { -} -*/ - -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the item to be re-orderable. - return YES; -} -*/ - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.h b/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.h index debc5e6..7a29265 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.h @@ -7,12 +7,7 @@ #import -#import "XuniFlexGridKit/XuniFlexGridKit.h" -@interface EditConfirmationController : UIViewController - - --(bool)beginningEdit:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range; --(bool)cellEditEnding:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range cancel:(BOOL)cancel; - +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" +@interface EditConfirmationController : UIViewController @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.m b/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.m index dba8e82..f8f1f10 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/EditConfirmationController.m @@ -7,71 +7,89 @@ #import "EditConfirmationController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" -@interface EditConfirmationController (){ - NSObject *_temp; -} +@interface EditConfirmationController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @implementation EditConfirmationController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. - FlexGrid *flex = [[FlexGrid alloc] init]; - _temp = [[NSObject alloc] init]; - flex.tag = 1; - flex.delegate = self; - flex.isReadOnly = false; - flex.itemsSource = [CustomerData getCustomerData:100]; - [flex.columns removeObjectAtIndex:1]; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - flex.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65); - [flex setNeedsDisplay]; -} - --(bool)beginningEdit:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range{ - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - _temp = [flex.cells getCellDataForRow:range.row inColumn:range.col formatted:false]; - return false; -} - --(bool)cellEditEnding:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range cancel:(BOOL)cancel{ - dispatch_async(dispatch_get_main_queue(), ^{ - - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; + self.flex.isReadOnly = false; - if([[flex.cells getCellDataForRow:range.row inColumn:range.col formatted:false] isEqual:_temp]) - { - return; - } + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.autoGenerateColumns = false; - NSString *title = [[NSString alloc] init]; - NSString *message = [[NSString alloc] init]; - title = NSLocalizedString(@"Edit Confirmation", nil); - message = NSLocalizedString(@"Do you want to commit the edit?", nil); - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", nil) style:UIAlertActionStyleDefault handler:nil]; - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){ - [flex.cells setCellData:_temp forRow:range.row inColumn:range.col]; - [flex invalidate]; - }]; - [alertController addAction:okAction]; - [alertController addAction:cancelAction]; - [self presentViewController:alertController animated:true completion:nil]; - - }); + GridColumn *identifier = [[GridColumn alloc] init]; + identifier.binding = @"customerID"; + identifier.isReadOnly = true; + identifier.widthType = GridColumnWidthPixel; + identifier.width = 100; + [self.flex.columns addObject:identifier]; + + GridColumn *firstName = [[GridColumn alloc] init]; + firstName.binding = @"firstName"; + [self.flex.columns addObject:firstName]; + + GridColumn *lastName = [[GridColumn alloc] init]; + lastName.binding = @"lastName"; + [self.flex.columns addObject:lastName]; + + GridColumn *address = [[GridColumn alloc] init]; + address.binding = @"address"; + [self.flex.columns addObject:address]; + + GridColumn *city = [[GridColumn alloc] init]; + city.binding = @"city"; + [self.flex.columns addObject:city]; - return false; + GridColumn *postalCode = [[GridColumn alloc] init]; + postalCode.binding = @"postalCode"; + [self.flex.columns addObject:postalCode]; + + GridColumn *active = [[GridColumn alloc] init]; + active.binding = @"active"; + active.widthType = GridColumnWidthPixel; + active.width = 70; + [self.flex.columns addObject:active]; + + self.flex.itemsSource = [CustomerData getCustomerData:100]; + + [self.flex.flexGridCellEditEnding addHandler:^(XuniEventContainer *eventContainer) { + NSObject* activeEditorValue = self.flex.activeEditorValue; + + if(activeEditorValue == nil) activeEditorValue = @""; + + if([[self.flex.cells getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:false] isEqual:activeEditorValue]) + { + eventContainer.eventArgs.cancel = true; + return; + } + + NSObject* prev = [self.flex.cells getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:false]; + + NSString *title = [[NSString alloc] init]; + NSString *message = [[NSString alloc] init]; + title = NSLocalizedString(@"Edit Confirmation", nil); + message = NSLocalizedString(@"Do you want to commit the edit?", nil); + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){ + }]; + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){ + [self.flex.cells setCellData:prev forRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; + }]; + + + [alertController addAction:okAction]; + [alertController addAction:cancelAction]; + [self presentViewController:alertController animated:true completion:nil]; + + eventContainer.eventArgs.cancel = false; + + } forObject:self]; } + + @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.h b/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.h index 1038e06..421032a 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.h @@ -7,14 +7,14 @@ #import -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "CustomerData.h" -@interface EditingFormController : UIViewController +@interface EditingFormController : UIViewController + +@property CustomerData* edited; + -(void)cancel; -(void)confirm; -@end - -extern EditingFormController* efc; -extern CustomerData* edited; \ No newline at end of file +@end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.m b/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.m index 052f951..8486613 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/EditingFormController.m @@ -7,77 +7,60 @@ #import "EditingFormController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "CustomerObjectEditor.h" -EditingFormController* efc; -CustomerData* edited; - @interface EditingFormController () @property (weak, nonatomic) IBOutlet UIVisualEffectView *editpanel; +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *editaction; @end @implementation EditingFormController -{ - FlexGrid *flex; -} - (void)viewDidLoad { [super viewDidLoad]; - efc = self; - // Do any additional setup after loading the view, typically from a nib. - flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.isReadOnly = true; - flex.delegate = self; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - [flex autoSizeColumns:0 to:flex.columns.count-1]; - [self.view addSubview:flex]; - [self.view sendSubviewToBack:flex]; -} - --(void)cancel -{ - [objEdit resignFirstResponder]; - [UIView animateWithDuration:0.7 animations:^{ - _editpanel.alpha = 0; - } completion:^(BOOL finished){ - _editpanel.hidden = true; - }]; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + + [self.flex.flexGridSelectionChanged addHandler:^(XuniEventContainer *eventContainer) { + self.editaction.enabled = true; + } forObject:self]; + + + [self.flex.flexGridTapped addHandler:^(XuniEventContainer *eventContainer) { + [self cancel]; + } forObject:self]; + + [self.flex.flexGridCellDoubleTapped addHandler:^(XuniEventContainer *eventContainer) { + if(!_editpanel.hidden) + { + [self cancel]; + return; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [self beginEditing]; + }); + + } forObject:self]; + + [self.flex autoSizeColumns:0 to:self.flex.columns.count-1]; } --(void)confirm -{ - [flex.collectionView raiseCollectionChanged]; - [self cancel]; +- (IBAction)doedit:(id)sender { + [self beginEditing]; } --(BOOL)tapped:(FlexGrid *)sender point:(XuniPoint *)point -{ - [self cancel]; - - return false; -} --(bool)cellDoubleTapped:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange:(FlexCellRange *)range +-(void)beginEditing { - /*int i = args.row; - - CustomerData* dt = [[CustomerData alloc] initWithCustomerID:999 countryID:90 firstName:@"21" lastName:@"22" address:@"343" city:@"34243" country:@"hohland" postalCode:@"02222" lastOrderDate:nil orderCount:0 orderTotal:0 active:false]; + self.edited = [self.flex.collectionView.items objectAtIndex:self.flex.selection.row]; - [flex.itemsSource setObject:dt atIndexedSubscript:i]; - [flex.collectionView raiseCollectionChanged];*/ - - if(!_editpanel.hidden) - { - [self tapped:nil point:nil]; - return false; - } - - edited = [flex.collectionView.items objectAtIndex:range.row]; + CustomerObjectEditor* objEdit = (CustomerObjectEditor*)self.childViewControllers[0]; [objEdit initObject]; @@ -89,19 +72,25 @@ -(bool)cellDoubleTapped:(FlexGrid *)sender panel:(FlexGridPanel *)panel forRange } completion:^(BOOL finished){ _editpanel.alpha = 1; }]; - return false; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; +-(void)cancel +{ + CustomerObjectEditor* objEdit = (CustomerObjectEditor*)self.childViewControllers[0]; + [objEdit resignFirstResponder]; + [UIView animateWithDuration:0.7 animations:^{ + _editpanel.alpha = 0; + } completion:^(BOOL finished){ + _editpanel.hidden = true; + }]; - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; } + +-(void)confirm +{ + [self.flex.collectionView raiseCollectionChanged]; + [self cancel]; +} + + @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.h b/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.h index 46827cf..666086e 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.h @@ -6,6 +6,8 @@ // #import +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" @interface FilterController : UIViewController +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.m b/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.m index 74deca6..7e7ea52 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterController.m @@ -7,260 +7,122 @@ #import "FilterController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" -#import "FilterFormController.h" -#import "SharedFilterData.h" +#import "FilterData.h" +#import "FilterGridViewController.h" -@interface FilterController (){ - SharedFilterData *sharedData; -} +@interface FilterController () + +@property (weak, nonatomic) IBOutlet UIBarButtonItem *filterButton; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *removeFilterButton; +@property (weak, nonatomic) IBOutlet UIVisualEffectView *filterPane; @end @implementation FilterController -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - sharedData = [SharedFilterData sharedInstance]; - UIButton *filterButton = [UIButton buttonWithType:UIButtonTypeSystem]; - UIButton *removeButton = [UIButton buttonWithType:UIButtonTypeSystem]; - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.isReadOnly = true; - flex.itemsSource = [CustomerData getCustomerData:100]; - [filterButton setTitle:NSLocalizedString(@"Filter", nil) forState:UIControlStateNormal]; - [removeButton setTitle:NSLocalizedString(@"Remove", nil) forState:UIControlStateNormal]; - [filterButton addTarget:self action:@selector(filterButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - [removeButton addTarget:self action:@selector(removeButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - - flex.tag = 1; - filterButton.tag = 2; - removeButton.tag = 3; - - [self.view addSubview:filterButton]; - [self.view addSubview:removeButton]; - [self.view addSubview:flex]; - - +- (void)doDropFilter { + self.filterButton.title = NSLocalizedString(@"Filter", nil); + self.removeFilterButton.enabled = false; + self.filterPane.hidden = true; + self.flex.collectionView.filter = ^BOOL (NSObject *item){ + return true; + }; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. +- (void)doApplyFilter { + self.filterButton.title = NSLocalizedString(@"Change", nil); + self.filterPane.hidden = true; + self.removeFilterButton.enabled = true; + + self.flex.collectionView.filter = ^BOOL (NSObject *item){ + NSMutableArray *shared = [FilterData sharedFilterData]; + bool result = true; + for (int i = 0; i < shared.count; i++) { + FilterData *fd = [shared objectAtIndex:i]; + + GridColumn *col = (GridColumn *)[self.flex.columns objectAtIndex:i]; + NSString *thisprop = [col getBoundValue:item].description.lowercaseString; + NSString *filterstr = fd.filterString.lowercaseString; + + if(filterstr.length>0){ + if (fd.filterOperation == 0) { + //contains + if (![thisprop containsString:filterstr]) { + result = false; + break; + } + + } else if (fd.filterOperation == 1) { + //starts + if (![thisprop hasPrefix:filterstr]) { + result = false; + break; + } + } else if (fd.filterOperation == 2) { + //ends + if (![thisprop hasSuffix:filterstr]) { + result = false; + break; + } + } else if (fd.filterOperation == 3) { + //equalstext + if (![thisprop isEqualToString:filterstr]) { + result = false; + break; + } + } + } + } + return result; + }; } --(void) viewDidAppear:(BOOL)animated{ - [super viewDidAppear:true]; - - if (sharedData.filterSet == true) { - - if (sharedData.filterOperation == 0) { - [self containsFilter]; - } - else if ([sharedData.filterOperation isEqual: @(1)]){ - [self beginsWithFilter]; - } - else if ([sharedData.filterOperation isEqual: @(2)]){ - [self endsWithFilter]; - } - else if ([sharedData.filterOperation isEqual: @(3)]){ - [self equalsFilter]; + +- (void)doStartEditingFilter { + if ([self.filterButton.title isEqualToString:NSLocalizedString(@"Filter", nil)]) { + NSMutableArray *shared = [FilterData sharedFilterData]; + [shared removeAllObjects]; + for (int i = 0; i < self.flex.columns.count; i++) { + GridColumn *c = [self.flex.columns objectAtIndex:i]; + FilterData *fd = [[FilterData alloc]init]; + fd.filterColumn = c.header; + fd.filterOperation = 0; + fd.filterString = nil; + [shared addObject:fd]; } } -} --(void) viewDidDisappear:(BOOL)animated{ - [super viewDidDisappear:true]; - sharedData.filterSet = false; - sharedData.filterString = @""; - sharedData.filterOperation = 0; -} + FilterGridViewController *filterController = (FilterGridViewController *)self.childViewControllers.firstObject; + filterController.flex.itemsSource = [FilterData sharedFilterData]; -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - UIButton *filterButton = (UIButton*)[self.view viewWithTag:2]; - UIButton *removeButton = (UIButton*)[self.view viewWithTag:3]; - filterButton.frame = CGRectMake(0, 60, self.view.bounds.size.width/2, 50); - - removeButton.frame = CGRectMake(self.view.bounds.size.width/2, 60, self.view.bounds.size.width/2, 50); - - flex.frame = CGRectMake(0, 110, self.view.bounds.size.width, self.view.bounds.size.height-110); -} + GridColumn *operID = (GridColumn *)[filterController.flex.columns objectAtIndex:1]; + NSMutableArray *items = [NSMutableArray arrayWithArray:[FilterOperation defaultOperations]]; + operID.dataMap = [[GridDataMap alloc] initWithArray:items selectedValuePath:@"identifier" displayMemberPath:@"title"]; --(void)filterButtonClicked{ - [self performSegueWithIdentifier:@"FilterFormSegue" sender:self]; + self.filterButton.title = NSLocalizedString(@"Done", nil); + self.filterPane.hidden = false; + self.removeFilterButton.enabled = true; } --(void)containsFilter{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - [dateFormat setDateFormat:@"M/d/yy"]; - flex.collectionView.filter = ^ BOOL (NSObject *item){ - CustomerData *d = (CustomerData*)item; - if ([[NSString stringWithFormat:@"%lu", d.customerID] rangeOfString:sharedData.filterString].location != NSNotFound) { - return true; - } - else if ([[NSString stringWithFormat:@"%lu", d.countryID] rangeOfString:sharedData.filterString].location != NSNotFound) { - return true; - } - else if ([[NSString stringWithFormat:@"%@",d.email] rangeOfString:sharedData.filterString].location != NSNotFound) { - return true; - } - else if ([[d.firstName lowercaseString] rangeOfString:[sharedData.filterString lowercaseString]].location != NSNotFound) { - return true; - } - else if ([[d.lastName lowercaseString] rangeOfString:[sharedData.filterString lowercaseString]].location != NSNotFound) - { - return true; - } - else if ([[d.country lowercaseString] rangeOfString:[sharedData.filterString lowercaseString]].location != NSNotFound){ - return true; - } - else if ([[d.address lowercaseString] rangeOfString:[sharedData.filterString lowercaseString]].location != NSNotFound){ - return true; - } - else if ([[d.city lowercaseString] rangeOfString:[sharedData.filterString lowercaseString]].location != NSNotFound){ - return true; - } - else if ([[dateFormat stringFromDate:d.lastOrderDate] rangeOfString:sharedData.filterString].location != NSNotFound) { - return true; - } - else { - return false; - } - }; +- (IBAction)doFilter:(id)sender { + if ([self.filterButton.title isEqualToString:NSLocalizedString(@"Done", nil)]) { + [self doApplyFilter]; + } else { + [self doStartEditingFilter]; + } } --(void)equalsFilter{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - [dateFormat setDateFormat:@"M/d/yy"]; - flex.collectionView.filter = ^ BOOL (NSObject *item){ - CustomerData *d = (CustomerData*)item; - - if ([[NSString stringWithFormat:@"%lu", d.customerID] isEqualToString:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%lu", d.countryID] isEqualToString:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%@", d.email] isEqualToString:sharedData.filterString]) { - return true; - } - else if ([d.firstName isEqualToString:sharedData.filterString]) { - return true; - } - else if ([d.lastName isEqualToString:sharedData.filterString]) - { - return true; - } - else if ([d.country isEqualToString:sharedData.filterString]){ - return true; - } - else if ([d.address isEqualToString:sharedData.filterString]){ - return true; - } - else if ([d.city isEqualToString:sharedData.filterString]){ - return true; - } - else if ([[dateFormat stringFromDate:d.lastOrderDate] isEqualToString:sharedData.filterString]) { - return true; - } - else { - return false; - } - }; +- (IBAction)removeFilter:(id)sender { + [self doDropFilter]; } --(void)beginsWithFilter{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - [dateFormat setDateFormat:@"M/d/yy"]; - flex.collectionView.filter = ^ BOOL (NSObject *item){ - CustomerData *d = (CustomerData*)item; - if ([[NSString stringWithFormat:@"%lu", d.customerID] hasPrefix:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%lu", d.countryID] hasPrefix:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%@",d.email] hasPrefix:sharedData.filterString]) { - return true; - } - - else if ([[d.firstName lowercaseString] hasPrefix:[sharedData.filterString lowercaseString]]) { - return true; - } - else if ([[d.lastName lowercaseString] hasPrefix:[sharedData.filterString lowercaseString]]) - { - return true; - } - else if ([[d.country lowercaseString] hasPrefix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[d.address lowercaseString] hasPrefix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[d.city lowercaseString] hasPrefix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[dateFormat stringFromDate:d.lastOrderDate] hasPrefix:sharedData.filterString]) { - return true; - } - else { - return false; - } - }; -} +- (void)viewDidLoad { + [super viewDidLoad]; --(void)endsWithFilter{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; - [dateFormat setDateFormat:@"M/d/yy"]; - flex.collectionView.filter = ^ BOOL (NSObject *item){ - CustomerData *d = (CustomerData*)item; - if ([[NSString stringWithFormat:@"%lu", d.customerID] hasSuffix:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%lu", d.countryID] hasSuffix:sharedData.filterString]) { - return true; - } - else if ([[NSString stringWithFormat:@"%@",d.email] hasSuffix:sharedData.filterString]) { - return true; - } - - else if ([[d.firstName lowercaseString] hasSuffix:[sharedData.filterString lowercaseString]]) { - return true; - } - else if ([[d.lastName lowercaseString] hasSuffix:[sharedData.filterString lowercaseString]]) - { - return true; - } - else if ([[d.country lowercaseString] hasSuffix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[d.address lowercaseString] hasSuffix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[d.city lowercaseString] hasSuffix:[sharedData.filterString lowercaseString]]){ - return true; - } - else if ([[dateFormat stringFromDate:d.lastOrderDate] hasSuffix:sharedData.filterString]) { - return true; - } - else { - return false; - } - }; -} + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; --(void)removeButtonClicked{ - sharedData.filterSet = false; - sharedData.filterString = @""; - sharedData.filterOperation = 0; - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - flex.collectionView.filter = ^ BOOL (NSObject *item){ - return true; - }; } + @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.h b/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.h new file mode 100644 index 0000000..cb739e4 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.h @@ -0,0 +1,25 @@ +// +// SharedFilterData.h +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// + +#import + +@interface FilterOperation: NSObject +@property NSString* title; +@property int identifier; + ++ (NSArray *)defaultOperations; +@end + +@interface FilterData : NSObject + +@property NSString *filterColumn; +@property int filterOperation; +@property NSString *filterString; + ++(NSMutableArray *) sharedFilterData; + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.m b/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.m new file mode 100644 index 0000000..f49458a --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterData.m @@ -0,0 +1,41 @@ +// +// SharedFilterData.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// + +#import "FilterData.h" + +@implementation FilterData + ++(NSMutableArray *)sharedFilterData{ + static NSMutableArray *sharedInstance = nil; + + @synchronized(self){ + if(!sharedInstance){ + sharedInstance = [[NSMutableArray alloc] init]; + } + } + return sharedInstance; +} + +@end + +@implementation FilterOperation ++ (NSArray *)defaultOperations { + NSString *operations = @"Contains|StartsWith|EndsWith|EqualsText"; + NSArray *operationsArray = [operations componentsSeparatedByString:@"|"]; + + NSMutableArray* result = [[NSMutableArray alloc]init]; + for (NSString* operation in operationsArray) { + FilterOperation* oper = [[FilterOperation alloc]init]; + oper.title = operation; + oper.identifier = [operationsArray indexOfObject:operation]; + [result addObject:oper]; + } + + return result; +} +@end + diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.h b/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.h new file mode 100644 index 0000000..b1aa1c3 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.h @@ -0,0 +1,13 @@ +// +// FilterGridViewController.h +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" + +@interface FilterGridViewController : UIViewController +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.m b/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.m new file mode 100644 index 0000000..26e505d --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FilterGridViewController.m @@ -0,0 +1,24 @@ +// +// FilterGridViewController.m +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import "FilterGridViewController.h" +#import "FilterData.h" + +@interface FilterGridViewController () + + +@end + +@implementation FilterGridViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; +} + + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FrozenCellsController.m b/ObjectiveC/FlexGrid101/FlexGrid101/FrozenCellsController.m index f4b1493..bc85929 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/FrozenCellsController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FrozenCellsController.m @@ -7,9 +7,10 @@ #import "FrozenCellsController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" @interface FrozenCellsController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -17,42 +18,23 @@ @implementation FrozenCellsController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.isReadOnly = true; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - flex.frozenColumns = 1; - flex.frozenRows = 1; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; - flex.allowMerging = FlexGridAllowMergingCells; + self.flex.frozenColumns = 1; + self.flex.frozenRows = 1; - for(int i = 0; i -@interface FullTextFilterController : UIViewController +@interface FullTextFilterController : UIViewController @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/FullTextFilterController.m b/ObjectiveC/FlexGrid101/FlexGrid101/FullTextFilterController.m index eda6f8b..d26eaaf 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/FullTextFilterController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/FullTextFilterController.m @@ -7,10 +7,12 @@ #import "FullTextFilterController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" @interface FullTextFilterController () +@property (weak, nonatomic) IBOutlet UITextField *filterField; +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -18,100 +20,127 @@ @implementation FullTextFilterController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - UITextField *filterField = [[UITextField alloc] init]; - filterField.delegate = self; - filterField.text = NSLocalizedString(@"Enter text to Filter", nil); - filterField.returnKeyType = UIReturnKeyDone; - filterField.keyboardType = UIKeyboardTypeDefault; - filterField.backgroundColor = [UIColor lightGrayColor]; - - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.isReadOnly = true; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - filterField.tag = 2; - [self.view addSubview:flex]; - [self.view addSubview:filterField]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - - -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - UITextField *filterField = (UITextField*)[self.view viewWithTag:2]; + + self.filterField.returnKeyType = UIReturnKeyDone; + self.filterField.keyboardType = UIKeyboardTypeDefault; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + + + [self.flex.flexGridFormatItem addHandler:^(XuniEventContainer *eventContainer) { + if(eventContainer.eventArgs.panel == self.flex.cells) + { + if([self.flex.editRange intersects:eventContainer.eventArgs.cellRange]) return; + if(self.flex.columns[eventContainer.eventArgs.col].dataType==XuniDataTypeBoolean) return; + + NSError *error; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern: self.filterField.text options:NSRegularExpressionCaseInsensitive error:&error]; + + NSString* data = [self.flex getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:true].description; + + if (!error) + { + NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:data]; + NSArray *allMatches = [regex matchesInString:data options:0 range:NSMakeRange(0, [data length])]; + for (NSTextCheckingResult *aMatch in allMatches) + { + NSRange matchRange = [aMatch range]; + [attributedString setAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:self.flex.font.pointSize],NSForegroundColorAttributeName:[UIColor redColor]} range: matchRange]; + } + + CGRect t = [eventContainer.eventArgs.panel getCellRectForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; + + GridColumn *col = [self.flex.columns objectAtIndex:eventContainer.eventArgs.col]; + + CGSize sz = [attributedString size]; + + NSTextAlignment align = col.horizontalAlignment; + + + if (align == NSTextAlignmentRight) { + double mod = t.size.width - sz.width - 4; + if (mod < 4) mod = 4; + t.origin.x += mod; + } else if (align == NSTextAlignmentCenter) { + double mod = (t.size.width - sz.width) / 2; + if (mod < 4) mod = 4; + t.origin.x += mod; + } else { + t.origin.x += 4; + } + + double mod = (t.size.height - sz.height) / 2; + if (mod < 4) mod = 4; + + t.origin.y += mod; + + [attributedString drawInRect:t]; + eventContainer.eventArgs.cancel = true; + } + } - filterField.frame = CGRectMake(0, 65, self.view.bounds.size.width, 50); - flex.frame = CGRectMake(0, 115, self.view.bounds.size.width, self.view.bounds.size.height-115); - [flex setNeedsDisplay]; + } forObject:self]; + } --(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ - return true; -} --(void)textFieldDidBeginEditing:(UITextField *)textField{ - [textField selectAll:nil]; -} --(BOOL)textFieldShouldEndEditing:(UITextField *)textField{ - return true; -} --(void)textFieldDidEndEditing:(UITextField *)textField{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; +- (IBAction)onTextChange:(UITextField *)sender { + UITextField* textField = sender; + FlexGrid *flex = self.flex; NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"M/d/yy"]; if(textField.text.length) { - flex.collectionView.filter = ^ BOOL (NSObject *item){ - CustomerData *d = (CustomerData*)item; - - if ([[NSString stringWithFormat:@"%lu", d.customerID] isEqualToString:textField.text]) { - return true; - } - else if ([[NSString stringWithFormat:@"%lu", d.countryID] isEqualToString:textField.text]) { - return true; - } - else if ([[NSString stringWithFormat:@"%@", d.email] isEqualToString:textField.text]) { - return true; - } - else if ([d.firstName isEqualToString:textField.text]) { - return true; - } - else if ([d.lastName isEqualToString:textField.text]) - { - return true; - } - else if ([d.country isEqualToString:textField.text]){ - return true; - } - else if ([d.city isEqualToString:textField.text]){ - return true; - } - else if ([d.address isEqualToString:textField.text]){ - return true; - } - else if ([[dateFormat stringFromDate:d.lastOrderDate] isEqualToString:textField.text]) { - return true; - } - else { - return false; - } - }; + flex.collectionView.filter = ^ BOOL (NSObject *item){ + CustomerData *d = (CustomerData*)item; + + if ([[NSString stringWithFormat:@"%lu", d.customerID].lowercaseString containsString:textField.text.lowercaseString]) { + return true; + } + else if ([[NSString stringWithFormat:@"%lu", d.countryID].lowercaseString containsString:textField.text.lowercaseString]) { + return true; + } + else if ([[NSString stringWithFormat:@"%@", d.email].lowercaseString containsString:textField.text.lowercaseString]) { + return true; + } + else if ([d.firstName.lowercaseString containsString:textField.text.lowercaseString]) { + return true; + } + else if ([d.lastName.lowercaseString containsString:textField.text.lowercaseString]) + { + return true; + } + else if ([d.country.lowercaseString containsString:textField.text.lowercaseString]){ + return true; + } + else if ([d.city.lowercaseString containsString:textField.text.lowercaseString]){ + return true; + } + else if ([d.address.lowercaseString containsString:textField.text.lowercaseString]){ + return true; + } + else if ([[dateFormat stringFromDate:d.lastOrderDate].lowercaseString containsString:textField.text.lowercaseString]) { + return true; + } + else { + return false; + } + }; } else { flex.collectionView.filter = nil; } + } --(BOOL)textFieldShouldReturn:(UITextField *)textField{ - [textField resignFirstResponder]; - return true; + + +- (IBAction)finishedit:(UITextField *)sender { + [sender resignFirstResponder]; } + + @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.h b/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.h index f444823..ef241ff 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.h @@ -1,12 +1,14 @@ // -// GettingStartedController.h +// EditingController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // #import +#import -@interface GettingStartedController : UIViewController + +@interface GettingStartedController : UIViewController @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.m b/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.m index 487dd6b..f9a33b6 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/GettingStartedController.m @@ -1,5 +1,5 @@ // -// GettingStartedController.m +// EditingController.m // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. @@ -7,9 +7,12 @@ #import "GettingStartedController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" + + @interface GettingStartedController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -17,27 +20,75 @@ @implementation GettingStartedController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.isReadOnly = true; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.tag = 1; - [flex autoSizeColumns:0 to:flex.columns.count-1]; - [self.view addSubview:flex]; + + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = false; + self.flex.delegate = self; + + [self.flex.flexGridAutoGeneratingColumn addHandler:^(XuniEventContainer *eventContainer) { + if ([eventContainer.eventArgs.propertyInfo.name isEqualToString:@"country"] || [eventContainer.eventArgs.propertyInfo.name isEqualToString:@"name"] || [eventContainer.eventArgs.propertyInfo.name isEqualToString:@"orderAverage"]) { + eventContainer.eventArgs.cancel = true; + } else if ([eventContainer.eventArgs.propertyInfo.name isEqualToString:@"customerID"]) { + eventContainer.eventArgs.column.isReadOnly = true; + } else if ([eventContainer.eventArgs.propertyInfo.name isEqualToString:@"countryID"]) { + eventContainer.eventArgs.column.header = @"Country"; + eventContainer.eventArgs.column.horizontalAlignment = NSTextAlignmentLeft; + NSMutableArray *items = [NSMutableArray arrayWithArray:[CustomerData defaultCountries]]; + eventContainer.eventArgs.column.dataMap = [[GridDataMap alloc] initWithArray:items selectedValuePath:@"identifier" displayMemberPath:@"title"]; + + } else if ([eventContainer.eventArgs.propertyInfo.name isEqualToString:@"orderTotal"]) { + eventContainer.eventArgs.column.format = @"C2"; + } else if ([eventContainer.eventArgs.propertyInfo.name isEqualToString:@"address"]) { + eventContainer.eventArgs.column.wordWrap = true; + } + } forObject:self]; + + + self.flex.itemsSource = [CustomerData getCustomerData:100]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; - - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; + +- (bool)prepareCellForEdit:(FlexGrid *)sender panel:(GridPanel *)panel forRange:(GridCellRange *)range { + FlexGrid *flex = self.flex; + GridColumn *col = [flex.columns objectAtIndex:range.col]; + if ([col.binding isEqualToString:@"lastOrderDate"]) { + UITextField *editor = (UITextField *)flex.activeEditor; + UIDatePicker *picker = [[UIDatePicker alloc] init]; + NSDate *d = (NSDate *)[flex.cells getCellDataForRow:range.row inColumn:range.col formatted:NO]; + picker.opaque = true; + picker.datePickerMode = UIDatePickerModeDate; + picker.date = d; + [picker addTarget:self action:@selector(onDatePickerChanged:) forControlEvents:UIControlEventValueChanged]; + editor.inputView = picker; + UIToolbar *toolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, flex.frame.size.width, 44)]; + toolbar.barStyle = UIBarStyleDefault; + UIBarButtonItem *done = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(endEditDatePicker:)]; + UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; + [toolbar setItems:@[space, done]]; + editor.inputAccessoryView = toolbar; + editor.clearButtonMode = UITextFieldViewModeNever; + } + return false; +} + +- (void)onDatePickerChanged:(UIDatePicker *)sender { + FlexGrid *flex = self.flex; + UITextField *editor = (UITextField *)flex.activeEditor; + GridColumn *c = [flex.columns objectAtIndex:flex.editRange.col]; + editor.text = (NSString *)[c getFormattedValue:sender.date]; } -@end \ No newline at end of file + +- (BOOL)endEditDatePicker:(UITextField *)textField { + FlexGrid *flex = self.flex; + UITextField *editor = (UITextField *)flex.activeEditor; + UIDatePicker *picker = (UIDatePicker *)editor.inputView; + [flex.cells setCellData:picker.date forRow:flex.editRange.row inColumn:flex.editRange.col]; + [flex finishEditing:true]; + return true; +} + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/GroupingController.m b/ObjectiveC/FlexGrid101/FlexGrid101/GroupingController.m index 15aadb5..dda6a8d 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/GroupingController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/GroupingController.m @@ -7,9 +7,12 @@ #import "GroupingController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" @interface GroupingController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *sortButton; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *collapseButton; @end @@ -17,60 +20,43 @@ @implementation GroupingController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + self.flex.autoGenerateColumns = false; - UIButton *sortAscendingButton = [UIButton buttonWithType:UIButtonTypeSystem]; - - UIButton *sortDescendingButton = [UIButton buttonWithType:UIButtonTypeSystem]; - - [sortAscendingButton setTitle:NSLocalizedString(@"Ascending", nil) forState:UIControlStateNormal]; - [sortDescendingButton setTitle:NSLocalizedString(@"Descending", nil) forState:UIControlStateNormal]; - [sortAscendingButton addTarget:self action:@selector(sortAscendingButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - [sortDescendingButton addTarget:self action:@selector(sortDescendingButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - [sortAscendingButton.titleLabel setTextAlignment:NSTextAlignmentCenter]; - [sortAscendingButton.titleLabel setTextAlignment:NSTextAlignmentCenter]; - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.isReadOnly = true; + GridColumn *c1 = [[GridColumn alloc] init]; + c1.binding = @"active"; + c1.header = NSLocalizedString(@"Active", nil); + c1.width = 100; - flex.autoGenerateColumns = false; - FlexColumn *c1 = [[FlexColumn alloc] init]; - c1.binding = @"firstName"; - c1.header = NSLocalizedString(@"First Name", nil); + GridColumn *c2 = [[GridColumn alloc] init]; + c2.binding = @"firstName"; + c2.header = NSLocalizedString(@"Name", nil); - c1.width = 100; - FlexColumn *c2 = [[FlexColumn alloc] init]; - c2.binding = @"lastName"; - c2.header = NSLocalizedString(@"Last Name", nil); - FlexColumn *c3 = [[FlexColumn alloc] init]; + GridColumn *c3 = [[GridColumn alloc] init]; c3.binding = @"orderTotal"; c3.header = NSLocalizedString(@"Order Total", nil); c3.format = @"C"; c3.aggregate = XuniAggregateSum; - [flex.columns addObject:c1]; - [flex.columns addObject:c2]; - [flex.columns addObject:c3]; + + [self.flex.columns addObject:c1]; + [self.flex.columns addObject:c2]; + [self.flex.columns addObject:c3]; XuniPropertyGroupDescription *gd = [[XuniPropertyGroupDescription alloc]initWithProperty:@"country"]; - XuniSortDescription *sd =[[XuniSortDescription alloc] initWithProperty:@"country" ascending:true]; - flex.itemsSource = [CustomerData getCustomerData:100]; - [flex.collectionView.groupDescriptions addObject:gd]; - [flex.collectionView.sortDescriptions addObject:sd]; - flex.tag = 1; - sortAscendingButton.tag = 2; - sortDescendingButton.tag = 3; - [self.view addSubview:sortAscendingButton]; - [self.view addSubview:sortDescendingButton]; - [self starSizing:flex]; - [self.view addSubview:flex]; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + [self.flex.collectionView.groupDescriptions addObject:gd]; + + [self starSizing:self.flex]; } -(void)starSizing:(FlexGrid*)g{ for (int i = 0; i < g.columns.count; i++) { - FlexColumn *c = [g.columns objectAtIndex:i]; - c.widthType = FlexColumnWidthStar; - c.width = (i == 0) ? 3 : (i == 3) ? 3 : 4; + GridColumn *c = [g.columns objectAtIndex:i]; + c.widthType = GridColumnWidthStar; + c.width = (i == 0) ? 2 : (i == 3) ? 3 : 4; } } @@ -79,31 +65,55 @@ - (void)didReceiveMemoryWarning { // Dispose of any resources that can be recreated. } -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - UIButton *sortAscendingButton = (UIButton*)[self.view viewWithTag:2]; - UIButton *sortDescendingButton = (UIButton*)[self.view viewWithTag:3]; - sortAscendingButton.frame = CGRectMake(0, 60, self.view.bounds.size.width/2, 50); - - sortDescendingButton.frame = CGRectMake(self.view.bounds.size.width/2, 60, self.view.bounds.size.width/2, 50); +- (IBAction)doSort:(id)sender { + UIBarButtonItem* btn = (UIBarButtonItem*)sender; + if([btn.title isEqualToString:NSLocalizedString(@"Z-A", nil)]) + { + [self sortDescendingButtonClicked]; + btn.title = NSLocalizedString(@"A-Z", nil); + } + else + { + [self sortAscendingButtonClicked]; + btn.title = NSLocalizedString(@"Z-A", nil); + } +} - flex.frame = CGRectMake(0, 110, self.view.bounds.size.width, self.view.bounds.size.height-110); - [flex setNeedsDisplay]; +- (IBAction)doCollapse:(id)sender { + UIBarButtonItem* btn = (UIBarButtonItem*)sender; + if([btn.title isEqualToString:NSLocalizedString(@"Collapse", nil)]) + { + [self.flex collapseGroupsToLevel:0]; + btn.title = NSLocalizedString(@"Expand", nil); + + } + else + { + if ([self.flex finishEditing:NO]) { + for (int i = 0; i < self.flex.rows.count; i++) { + GridRow *row = (GridRow *)[self.flex.rows objectAtIndex:i]; + if ([row isKindOfClass:[GridGroupRow class]]) { + GridGroupRow *group = (GridGroupRow *)row; + group.isCollapsed = false; + } + } + } + btn.title = NSLocalizedString(@"Collapse", nil); + } } -(void)sortAscendingButtonClicked{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - [flex.collectionView.sortDescriptions removeAllObjects]; + [self.flex.collectionView.sortDescriptions removeAllObjects]; XuniSortDescription *sd =[[XuniSortDescription alloc] initWithProperty:@"country" ascending:true]; - [flex.collectionView.sortDescriptions addObject:sd]; + [self.flex.collectionView.sortDescriptions addObject:sd]; + self.collapseButton.title = NSLocalizedString(@"Collapse", nil); } -(void)sortDescendingButtonClicked{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - [flex.collectionView.sortDescriptions removeAllObjects]; + [self.flex.collectionView.sortDescriptions removeAllObjects]; XuniSortDescription *sd =[[XuniSortDescription alloc] initWithProperty:@"country" ascending:false]; - [flex.collectionView.sortDescriptions addObject:sd]; + [self.flex.collectionView.sortDescriptions addObject:sd]; + self.collapseButton.title = NSLocalizedString(@"Collapse", nil); } @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/OnDemandController.m b/ObjectiveC/FlexGrid101/FlexGrid101/OnDemandController.m index d7ec9ba..5649f3e 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/OnDemandController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/OnDemandController.m @@ -7,67 +7,122 @@ #import "OnDemandController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" -#import - -@interface DemoCursorCollectionView: XuniCursorCollectionView - -@end - +#import "YouTubeCollectionView.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" +#import @interface OnDemandController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@property (weak, nonatomic) IBOutlet UITextField *textInput; +@property (weak, nonatomic) IBOutlet UISegmentedControl *sortSelect; @end -@implementation DemoCursorCollectionView --(id)init -{ - DemoCursorCollectionView * coll = [super init]; - - coll.sourceCollection = [CustomerData getCustomerData:100]; - - return coll; +@implementation OnDemandController + +- (IBAction)startSearching:(id)sender { + [self.textInput resignFirstResponder]; + [self updateSearch]; } --(NSMutableArray *)itemGetter:(NSNumber *)desiredNumber -{ - return [CustomerData getCustomerData:desiredNumber==nil?100:desiredNumber.intValue]; +- (IBAction)searchModeChanged:(id)sender { + [self updateSearch]; } --(bool) hasMoreItems +-(void) updateSearch { - return self.sourceCollection.count < 400; + NSArray* selArray = @[@"relevance",@"date",@"viewCount",@"rating",@"title"]; + + YouTubeCollectionView* cv = [[YouTubeCollectionView alloc] initWithQuery:self.textInput.text orderBy:[selArray objectAtIndex:self.sortSelect.selectedSegmentIndex]]; + self.flex.collectionView = cv; + + + [cv loadMoreItems:@(50) completion:^{ + }]; } -@end -@implementation OnDemandController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.isReadOnly = true; - flex.collectionView = [[DemoCursorCollectionView alloc] init]; - flex.tag = 1; - [flex autoSizeColumns:0 to:flex.columns.count-1]; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; + NSMutableDictionary* dic = [[NSMutableDictionary alloc]init]; + + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.isReadOnly = true; + + self.flex.autoGenerateColumns = false; - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; + GridColumn *thumbnail = [[GridColumn alloc] init]; + thumbnail.binding = @"thumbnail"; + thumbnail.width = 150; + [self.flex.columns addObject:thumbnail]; - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; + GridColumn *title = [[GridColumn alloc] init]; + title.binding = @"title"; + title.wordWrap = true; + [self.flex.columns addObject:title]; + + GridColumn *channel = [[GridColumn alloc] init]; + channel.binding = @"channelTitle"; + channel.wordWrap = true; + [self.flex.columns addObject:channel]; + + [self.flex.flexGridLoadedRows addHandler:^(XuniEventContainer *eventContainer) { + for(int i = 0; i *eventContainer) { + + GridColumn* col = self.flex.columns[eventContainer.eventArgs.col]; + if([col.binding isEqualToString:@"thumbnail"] && eventContainer.eventArgs.panel == self.flex.cells) + { + NSString* url = (NSString*)[self.flex getCellDataForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col formatted:false]; + NSData* imgdata = [dic objectForKey:url]; + if(imgdata == nil) + { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ + NSData* imgdata = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; + dispatch_async(dispatch_get_main_queue(), ^{ + [dic setObject:imgdata forKey:url]; + [self.flex invalidate]; + }); + }); + + eventContainer.eventArgs.cancel = true; + return; + } + + UIImage *image = [UIImage imageWithData:imgdata]; + CGRect r = [eventContainer.eventArgs.panel getCellRectForRow:eventContainer.eventArgs.row inColumn:eventContainer.eventArgs.col]; + + CGSize imageSize = image.size; + CGSize viewSize = r.size; + + float hfactor = imageSize.width / viewSize.width; + float vfactor = imageSize.height / viewSize.height; + + float factor = fmax(hfactor, vfactor); + + float newWidth = imageSize.width / factor; + float newHeight = imageSize.height / factor; + + CGRect newRect = CGRectMake(r.origin.x+(r.size.width-newWidth)/2,r.origin.y+(r.size.height-newHeight)/2, newWidth, newHeight); + + [image drawInRect:newRect]; + + eventContainer.eventArgs.cancel = true; + } + + } forObject:self]; + + + [self updateSearch]; } + @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/RowDetailsViewController.m b/ObjectiveC/FlexGrid101/FlexGrid101/RowDetailsViewController.m index 40da7f1..989ff70 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/RowDetailsViewController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/RowDetailsViewController.m @@ -6,50 +6,101 @@ // #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" #import "RowDetailsViewController.h" +#import +#import @interface RowDetailsViewController () -@property (weak, nonatomic) IBOutlet FlexGrid *grid; +@property (weak, nonatomic) IBOutlet FlexGrid *grid; +@property (weak, nonatomic) IBOutlet UISegmentedControl *detailMode; @end @implementation RowDetailsViewController +- (IBAction)detailModeChange:(id)sender { + switch (self.detailMode.selectedSegmentIndex) { + case 0: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityModeExpandSingle; + break; + case 1: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityModeExpandMultiple; + break; + case 2: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityModeSelection; + break; + } +} - (void)viewDidLoad { [super viewDidLoad]; - self.grid.isReadOnly = true; - self.grid.itemsSource = [CustomerData getCustomerData:100]; + self.grid.isReadOnly = true; + self.grid.selectionMode = GridSelectionModeRow; + self.grid.columnHeaderFont = [UIFont boldSystemFontOfSize:self.grid.columnHeaderFont.pointSize]; + self.grid.autoGenerateColumns = false; + + GridColumn *identifier = [[GridColumn alloc] init]; + identifier.binding = @"customerID"; + identifier.header = @"ID"; + identifier.isReadOnly = true; + identifier.widthType = GridColumnWidthPixel; + identifier.width = 45; + [self.grid.columns addObject:identifier]; + + GridColumn *firstName = [[GridColumn alloc] init]; + firstName.binding = @"firstName"; + firstName.widthType = GridColumnWidthStar; + firstName.width = 1; + [self.grid.columns addObject:firstName]; + + GridColumn *lastName = [[GridColumn alloc] init]; + lastName.binding = @"lastName"; + lastName.widthType = GridColumnWidthStar; + lastName.width = 1; + [self.grid.columns addObject:lastName]; - IXuniEventHandler rowHeaderLoadingEventHandler = ^(NSObject *sender, XuniEventArgs *args) - { - FlexGridRowHeaderLoadingEventArgs *e=(FlexGridRowHeaderLoadingEventArgs*)args; - UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom]; + + + [self.grid.detailProvider.gridRowHeaderLoading addHandler:^(XuniEventContainer *eventContainer) { + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn setImage:[UIImage imageNamed:@"show"] forState:(UIControlStateNormal)]; [btn setImage:[UIImage imageNamed:@"hide"] forState:(UIControlStateSelected)]; + btn.imageView.contentMode = UIViewContentModeScaleAspectFit; - e.button=btn; - }; - - [self.grid.detailProvider.gridRowHeaderLoading addHandler:rowHeaderLoadingEventHandler forObject:self]; - - - IXuniEventHandler detailCellCreatingHandler = ^(NSObject *sender, XuniEventArgs *args) - { - FlexGridDetailCellCreatingEventArgs *e = (FlexGridDetailCellCreatingEventArgs *)args; - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.itemsSource = [NSMutableArray arrayWithArray: [XuniReflector getProperties:e.row.dataItem]]; - e.view = flex; - }; - - [self.grid.detailProvider.detailCellCreating addHandler:detailCellCreatingHandler forObject:self]; - + eventContainer.eventArgs.button = btn; + + } forObject:self]; + - self.grid.detailProvider.detailVisibilityMode = FlexGridDetailVisibilityModeExpandMultiple; -} + [self.grid.detailProvider.detailCellCreating addHandler:^(XuniEventContainer *eventContainer) { + MKMapView *mapView = [[MKMapView alloc] init]; + eventContainer.eventArgs.view = mapView; + mapView.userInteractionEnabled = false; + + CLGeocoder *geocoder = [[CLGeocoder alloc] init]; + [geocoder geocodeAddressString:((CustomerData*)eventContainer.eventArgs.row.dataItem).city completionHandler:^(NSArray *placemarks, NSError *error) { + if (error) { + NSLog(@"%@", error); + } else { + CLPlacemark *placemark = [placemarks lastObject]; + float spanX = 0.0725; + float spanY = 0.0725; + MKCoordinateRegion region; + region.center.latitude = placemark.location.coordinate.latitude; + region.center.longitude = placemark.location.coordinate.longitude; + region.span = MKCoordinateSpanMake(spanX, spanY); + [mapView setRegion:region animated:NO]; + } + }]; + + } forObject:self]; + + + [self detailModeChange:self]; + + self.grid.itemsSource = [CustomerData getCustomerData:100]; -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; } + @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.h b/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.h new file mode 100644 index 0000000..62bdde7 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.h @@ -0,0 +1,20 @@ +// +// SampleData.h +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import + +@interface SampleData : NSObject + +@property NSString* title; +@property NSString* subtitle; +@property NSString* thumbnail; +@property NSString* link; +@property NSString* channelTitle; + +- (id)initWithTitle:(NSString*)title subtitle:(NSString*)subtitle; + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.m b/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.m new file mode 100644 index 0000000..b6c2f66 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/SampleData.m @@ -0,0 +1,21 @@ +// +// SampleData.m +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import "SampleData.h" + +@implementation SampleData +- (id)initWithTitle:(NSString*)title subtitle:(NSString*)subtitle +{ + self = [super init]; + if(self) + { + self.title = title; + self.subtitle = subtitle; + } + return self; +} +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.h b/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.h index 3bbfa30..aefdf14 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.h +++ b/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.h @@ -7,6 +7,6 @@ #import -@interface SelectionModesController : UIViewController +@interface SelectionModesController : UIViewController @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.m b/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.m index 9a4ca53..7dc9a3a 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/SelectionModesController.m @@ -7,88 +7,46 @@ #import "SelectionModesController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" -@interface SelectionModesController (){ - NSMutableArray *pickerData; -} -@end - -@implementation SelectionModesController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - pickerData =[[NSMutableArray alloc] initWithObjects:NSLocalizedString(@"None", nil), NSLocalizedString(@"Cell", nil), NSLocalizedString(@"Cell Range", nil), NSLocalizedString(@"Row", nil), NSLocalizedString(@"Row Range", nil), nil]; - UIPickerView *selectionModePicker = [[UIPickerView alloc] init]; - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.isReadOnly = true; - flex.selectionMode = FlexSelectionModeNone; - flex.itemsSource = [CustomerData getCustomerData:100]; - - selectionModePicker.delegate = self; - selectionModePicker.showsSelectionIndicator = YES; - selectionModePicker.hidden = false; - [selectionModePicker selectRow:0 inComponent:0 animated:false]; - - flex.tag = 1; - selectionModePicker.tag = 2; - - [self.view addSubview:selectionModePicker]; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} +@interface SelectionModesController () -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; - - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - UIPickerView *selectionModePicker = (UIPickerView*)[self.view viewWithTag:2]; - selectionModePicker.frame = CGRectMake(self.view.bounds.size.width/4, ss, self.view.bounds.size.width/2, 162); - - flex.frame = CGRectMake(0, selectionModePicker.frame.origin.y+selectionModePicker.frame.size.height, self.view.bounds.size.width, (self.view.bounds.size.height-selectionModePicker.frame.origin.y-selectionModePicker.frame.size.height)); - [flex setNeedsDisplay]; - [selectionModePicker setNeedsDisplay]; -} +@property (weak, nonatomic) IBOutlet FlexGrid *flex; +@property (weak, nonatomic) IBOutlet UISegmentedControl *modeSwitch; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *selected; +@property (weak, nonatomic) IBOutlet UIBarButtonItem *selectedCount; -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} +@end -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - return [pickerData count]; -} +@implementation SelectionModesController +- (IBAction)modeSwitched:(id)sender { + NSInteger row = self.modeSwitch.selectedSegmentIndex; -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexGrid *flex = (FlexGrid *)[self.view viewWithTag:1]; - - if (row == 0) { - flex.selectionMode = FlexSelectionModeNone; - } - else if (row == 1){ - flex.selectionMode = FlexSelectionModeCell; - } - else if (row == 2){ - flex.selectionMode = FlexSelectionModeCellRange; - } - else if (row == 3){ - flex.selectionMode = FlexSelectionModeRow; - } - else if (row == 4){ - flex.selectionMode = FlexSelectionModeRowRange; + self.flex.selectionMode = GridSelectionModeNone; + } else if (row == 1) { + self.flex.selectionMode = GridSelectionModeCell; + } else if (row == 2) { + self.flex.selectionMode = GridSelectionModeCellRange; + } else if (row == 3) { + self.flex.selectionMode = GridSelectionModeRow; + } else if (row == 4) { + self.flex.selectionMode = GridSelectionModeRowRange; } } -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - - return [pickerData objectAtIndex:row]; - +- (void)viewDidLoad { + [super viewDidLoad]; + self.flex.isReadOnly = true; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.selectionMode = GridSelectionModeNone; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + + [self.flex.flexGridSelectionChanged addHandler:^(XuniEventContainer *eventContainer) { + int selected = self.flex.selection.columnSpan * self.flex.selection.rowSpan; + + self.selectedCount.title = [NSString stringWithFormat:@"%i selected", selected]; + } forObject:self]; } + @end \ No newline at end of file diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/StarSizingController.m b/ObjectiveC/FlexGrid101/FlexGrid101/StarSizingController.m index 7654c24..394e348 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/StarSizingController.m +++ b/ObjectiveC/FlexGrid101/FlexGrid101/StarSizingController.m @@ -7,9 +7,10 @@ #import "StarSizingController.h" #import "CustomerData.h" -#import "XuniFlexGridKit/XuniFlexGridKit.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" @interface StarSizingController () +@property (weak, nonatomic) IBOutlet FlexGrid *flex; @end @@ -17,69 +18,46 @@ @implementation StarSizingController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - FlexGrid *flex = [[FlexGrid alloc] init]; - flex.columnHeaderFont = [UIFont boldSystemFontOfSize:flex.columnHeaderFont.pointSize]; - flex.autoGenerateColumns = false; - FlexColumn *c1 = [[FlexColumn alloc] init]; - c1.binding = @"customerID"; - c1.header = NSLocalizedString(@"ID", nil); - c1.widthType = FlexColumnWidthStar; - c1.width = 1; + self.flex.columnHeaderFont = [UIFont boldSystemFontOfSize:self.flex.columnHeaderFont.pointSize]; + self.flex.autoGenerateColumns = false; - FlexColumn *c2 = [[FlexColumn alloc] init]; - c2.binding = @"firstName"; - c2.header = NSLocalizedString(@"First Name", nil); - c2.widthType = FlexColumnWidthStar; + GridColumn *c1 = [[GridColumn alloc] init]; + c1.binding = @"firstName"; + c1.header = NSLocalizedString(@"First Name", nil); + c1.widthType = GridColumnWidthStar; + c1.width = 3; + + GridColumn *c2 = [[GridColumn alloc] init]; + c2.binding = @"lastName"; + c2.header = NSLocalizedString(@"Last Name", nil); + c2.widthType = GridColumnWidthStar; c2.width = 3; - FlexColumn *c3 = [[FlexColumn alloc] init]; - c3.binding = @"lastName"; - c3.header = NSLocalizedString(@"Last Name", nil); - c3.widthType = FlexColumnWidthStar; - c3.width = 3; + GridColumn *c3 = [[GridColumn alloc] init]; + c3.binding = @"lastOrderDate"; + c3.header = NSLocalizedString(@"Last Date", nil); + c3.widthType = GridColumnWidthStar; + c3.width = 2; - FlexColumn *c4 = [[FlexColumn alloc] init]; + GridColumn *c4 = [[GridColumn alloc] init]; c4.binding = @"orderTotal"; c4.header = NSLocalizedString(@"Total", nil); c4.format = @"C"; - c4.widthType = FlexColumnWidthStar; + c4.headerHorizontalAlignment = NSTextAlignmentLeft; + c4.widthType = GridColumnWidthStar; c4.width = 2; - [flex.columns addObject:c1]; - [flex.columns addObject:c2]; - [flex.columns addObject:c3]; - [flex.columns addObject:c4]; - flex.itemsSource = [CustomerData getCustomerData:100]; - flex.isReadOnly = true; - flex.tag = 1; - [self.view addSubview:flex]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexGrid *flex = (FlexGrid*)[self.view viewWithTag:1]; - CGFloat ss = [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.intrinsicContentSize.height; + [self.flex.columns addObject:c1]; + [self.flex.columns addObject:c2]; + [self.flex.columns addObject:c3]; + [self.flex.columns addObject:c4]; - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss); - [flex setNeedsDisplay]; + self.flex.itemsSource = [CustomerData getCustomerData:100]; + self.flex.isReadOnly = true; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.h b/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.h new file mode 100644 index 0000000..7506a4e --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.h @@ -0,0 +1,13 @@ +// +// UnboundSampleViewController.h +// FlexGrid101 +// +// Created by Mykola Kotyuck on 16.06.16. +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import + +@interface UnboundSampleViewController : UIViewController + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.m b/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.m new file mode 100644 index 0000000..29d400a --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/UnboundSampleViewController.m @@ -0,0 +1,81 @@ +// +// UnboundSampleViewController.m +// FlexGrid101 +// +// Created by Mykola Kotyuck on 16.06.16. +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import "UnboundSampleViewController.h" +#import "XuniFlexGridDynamicKit/XuniFlexGridDynamicKit.h" + +@interface UnboundSampleViewController () +@property (weak, nonatomic) IBOutlet FlexGrid *grid; + +@end + +@implementation UnboundSampleViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // allow merging + _grid.allowMerging = GridAllowMergingAll; + + // add rows/columns to the unbound grid + for (int i = 0; i < 12; i++) // three years, four quarters per year + { + [_grid.columns addObject:[[GridColumn alloc] init]]; + } + for (int i = 0; i < 500; i++) + { + [_grid.rows addObject:[[GridRow alloc] init]]; + } + + // populate the unbound grid with some stuff + for (int r = 0; r < _grid.rows.count; r++) + { + for (int c = 0; c < _grid.columns.count; c++) + { + _grid[r][c] = [NSString stringWithFormat:@"cell [%i, %i]", r, c]; + } + } + + // set unbound column headers + GridPanel* ch = _grid.columnHeaders; + [ch.rows addObject:[[GridRow alloc] init]]; // one header row for years, one for quarters + for (int c = 0; c < ch.columns.count; c++) + { + ch[0][c] = @(2016 + c / 4); // year + ch[1][c] = [NSString stringWithFormat:@"Q %i", c%4+1]; // quarter + } + + // allow merging the first fixed row + ch.rows[0].allowMerging = true; + + // set unbound row headers + GridPanel* rh = _grid.rowHeaders; + [rh.columns addObject:[[GridColumn alloc] init]]; + for (int c = 0; c < rh.columns.count; c++) + { + rh.columns[c].width = 60; + for (int r = 0; r < rh.rows.count; r++) + { + rh[r][c] = [NSString stringWithFormat:@"hdr %i, %i", c == 0 ? r / 2 : r, c]; + } + } + + // allow merging the first fixed column + rh.columns[0].allowMerging = true; + + [_grid autoSizeColumns:0 to:1 header:true]; + [_grid autoSizeColumns]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + + + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.h b/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.h new file mode 100644 index 0000000..94b2795 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.h @@ -0,0 +1,17 @@ +// +// YouTubeCollectionView.h +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import +#import + +@interface YouTubeCollectionView : XuniCursorCollectionView + +@property (readonly) NSString* query; +@property (readonly) NSString* orderBy; +-(id)initWithQuery:(NSString*)query orderBy:(NSString*)orderBy; + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.m b/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.m new file mode 100644 index 0000000..776e567 --- /dev/null +++ b/ObjectiveC/FlexGrid101/FlexGrid101/YouTubeCollectionView.m @@ -0,0 +1,70 @@ +// +// YouTubeCollectionView.m +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +#import "YouTubeCollectionView.h" +#import "SampleData.h" + +@interface YouTubeCollectionView () +@property NSString *pageToken; +@end + +@implementation YouTubeCollectionView + +- (id)initWithQuery:(NSString *)query orderBy:(NSString *)orderBy { + self = [super init]; + if (self) { + _query = query; + _orderBy = orderBy; + _pageToken = @""; + } + return self; +} + +- (bool)hasMoreItems { + return true; +} + +- (NSMutableArray *)itemGetter:(NSNumber *)desiredNumber { + NSMutableArray* dataToAppend = [[NSMutableArray alloc]init]; + + NSString *urlAddress = [NSString stringWithFormat:@"https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&q=%@&order=%@&maxResults=%@%@&key=%@", [_query stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]], _orderBy, desiredNumber, _pageToken.length ? [NSString stringWithFormat:@"&pageToken=%@", _pageToken] : @"", @"AIzaSyDFz8V9U0ccKXQ5oSrcRSoHqpaursqOudo"]; + + NSData *dataResult = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]; + NSError *error = nil; + id object = [NSJSONSerialization + JSONObjectWithData:dataResult + options:0 + error:&error]; + + if (error) { + } + + if ([object isKindOfClass:[NSDictionary class]]) { + NSDictionary *results = object; + self.pageToken = [results objectForKey:@"nextPageToken"]; + + NSArray* items = [results objectForKey:@"items"]; + for (NSDictionary* dict in items) { + NSString* title = [[dict objectForKey:@"snippet"] objectForKey:@"title"]; + NSString* description = [[dict objectForKey:@"snippet"] objectForKey:@"description"]; + + SampleData* sample = [[SampleData alloc] initWithTitle:title subtitle:description]; + sample.channelTitle = [[dict objectForKey:@"snippet"] objectForKey:@"channelTitle"]; + sample.link = [NSString stringWithFormat:@"http://www.youtube.com/watch?v=%@", [[dict objectForKey:@"id"] objectForKey:@"videoId"]]; + + sample.thumbnail = [[[[dict objectForKey:@"snippet"] objectForKey:@"thumbnails"] objectForKey:@"default"] objectForKey:@"url"]; + [dataToAppend addObject:sample]; + + } + } else { + } + + + return dataToAppend; +} + +@end diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/flexgrid_headers.png b/ObjectiveC/FlexGrid101/FlexGrid101/flexgrid_headers.png new file mode 100644 index 0000000..5ff47b3 Binary files /dev/null and b/ObjectiveC/FlexGrid101/FlexGrid101/flexgrid_headers.png differ diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings index 4c3f625..6ce77da 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ -/* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +/* Class = "UILabel"; text = "FlexGrid101"; ObjectID = "9OV-Zx-N0E"; */ +"9OV-Zx-N0E.text" = "FlexGrid101"; -/* Class = "UILabel"; text = "FlexGrid101"; ObjectID = "kId-c2-rCX"; */ -"kId-c2-rCX.text" = "FlexGrid101"; +/* Class = "UILabel"; text = " Copyright (c) 2016 GrapeCity. All rights reserved."; ObjectID = "yI0-Lc-fAb"; */ +"yI0-Lc-fAb.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings index 7137ac2..2623252 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings @@ -44,4 +44,11 @@ "Total" = "合計"; "Count" = "件数"; "Edit Columns" = "表示列の構成を編集"; -"Done" = "完了"; \ No newline at end of file +"Done" = "完了"; +"Monday" = "月曜日"; +"Tuesday" = "火曜日"; +"Wednesday" = "水曜日"; +"Thursday" = "木曜日"; +"Friday" = "金曜日"; +"Saturday" = "土曜日"; +"Sunday" = "日曜日"; diff --git a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Main.strings b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Main.strings index 42ca519..fdce41c 100644 --- a/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Main.strings +++ b/ObjectiveC/FlexGrid101/FlexGrid101/ja.lproj/Main.strings @@ -1,39 +1,273 @@ +/* Class = "UILabel"; text = "Display, edit and aggregate your data all at once with FlexGrid"; ObjectID = "04q-Qk-1Uw"; */ +"04q-Qk-1Uw.text" = "FlexGrid でデータを表示、編集、集計"; + +/* Class = "UILabel"; text = "Expand and collapse row details"; ObjectID = "06n-gc-HrI"; */ +"06n-gc-HrI.text" = "グリッドを展開/折りたたみして詳細を表示"; + /* Class = "UILabel"; text = "Address"; ObjectID = "1eT-oW-hrf"; */ "1eT-oW-hrf.text" = "住所(Address)"; /* Class = "UILabel"; text = "Cancel"; ObjectID = "27j-QJ-v3z"; */ "27j-QJ-v3z.text" = "キャンセル"; +/* Class = "UIBarButtonItem"; title = "Collapse"; ObjectID = "2Eb-oV-Hai"; */ +"2Eb-oV-Hai.title" = "折りたたみ"; + +/* Class = "UILabel"; text = "Filter"; ObjectID = "2LZ-vR-psM"; */ +"2LZ-vR-psM.text" = "フィルター"; + +/* Class = "UILabel"; text = "Custom Cells"; ObjectID = "2Th-7C-8LJ"; */ +"2Th-7C-8LJ.text" = "カスタムセル"; + +/* Class = "UILabel"; text = "Cell Freezing&Merging"; ObjectID = "2gG-ng-mWe"; */ +"2gG-ng-mWe.text" = "セルの固定と結合"; + +/* Class = "UINavigationItem"; title = "Star Sizing"; ObjectID = "3qT-IC-ym1"; */ +"3qT-IC-ym1.title" = "スターサイズ機能"; + /* Class = "UILabel"; text = "City"; ObjectID = "3zE-V2-2FJ"; */ "3zE-V2-2FJ.text" = "都市(City)"; -/* Class = "UINavigationItem"; title = "FlexGrid101"; ObjectID = "Gnw-bn-nSm"; */ -"Gnw-bn-nSm.title" = "FlexGrid101"; +/* Class = "UILabel"; text = "Shows the various cell selection modes"; ObjectID = "4tS-YM-9aG"; */ +"4tS-YM-9aG.text" = "各種セル選択モードを表示"; + +/* Class = "UILabel"; text = ">"; ObjectID = "AA4-TE-lHv"; */ +"AA4-TE-lHv.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "BGo-Hy-EXj"; */ +"BGo-Hy-EXj.text" = ">"; + +/* Class = "UINavigationItem"; title = "On Demand"; ObjectID = "BlD-bH-UCJ"; */ +"BlD-bH-UCJ.title" = "データオンデマンド"; + +/* Class = "UINavigationItem"; title = "Getting Started"; ObjectID = "Bmk-c4-cSH"; */ +"Bmk-c4-cSH.title" = "FlexGridの基本機能"; + +/* Class = "UILabel"; text = "Groups and aggregates a collection of videos"; ObjectID = "DJX-fJ-Pwm"; */ +"DJX-fJ-Pwm.text" = "コレクションをグループ化して集計"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[0] = "None"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[0]" = "なし"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[1] = "Cell"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[1]" = "セル"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[2] = "CellRange"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[2]" = "セル範囲"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[3] = "Row"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[3]" = "行"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[4] = "RowRange"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[4]" = "行範囲"; + +/* Class = "UISegmentedControl"; EGj-kt-ixf.segmentTitles[0] = "Single"; ObjectID = "EGj-kt-ixf"; */ +"EGj-kt-ixf.segmentTitles[0]" = "単一"; + +/* Class = "UISegmentedControl"; EGj-kt-ixf.segmentTitles[1] = "Multiple"; ObjectID = "EGj-kt-ixf"; */ +"EGj-kt-ixf.segmentTitles[1]" = "複数"; + +/* Class = "UISegmentedControl"; EGj-kt-ixf.segmentTitles[2] = "Selection"; ObjectID = "EGj-kt-ixf"; */ +"EGj-kt-ixf.segmentTitles[2]" = "選択"; -/* Class = "UIBarButtonItem"; title = "FlexGrid101"; ObjectID = "Kll-7W-u7d"; */ -"Kll-7W-u7d.title" = "FlexGrid101"; +/* Class = "UIBarButtonItem"; title = "Sort"; ObjectID = "Fwd-0m-rRb"; */ +"Fwd-0m-rRb.title" = "ソート"; + +/* Class = "UILabel"; text = ">"; ObjectID = "GPg-el-nwa"; */ +"GPg-el-nwa.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "Hgo-7Q-HXe"; */ +"Hgo-7Q-HXe.text" = ">"; + +/* Class = "UINavigationItem"; title = "Freezing&Merging"; ObjectID = "I2u-HG-HDn"; */ +"I2u-HG-HDn.title" = "セルの固定と結合"; + +/* Class = "UILabel"; text = "Shows a grid with custom cell merging"; ObjectID = "IHh-tS-Qvb"; */ +"IHh-tS-Qvb.text" = "隣接セルを結合(マージ)してグリッドをレイアウトする"; + +/* Class = "UILabel"; text = "Edit cells by input form rather than inline"; ObjectID = "Jnc-m9-pHa"; */ +"Jnc-m9-pHa.text" = "入力フォームでセルの内容を編集"; + +/* Class = "UILabel"; text = "Customizes a cell by displaying a numeric value in a gauge"; ObjectID = "Jqb-XX-nWX"; */ +"Jqb-XX-nWX.text" = "値をゲージで表現した独自形式のセルを表示"; + +/* Class = "UILabel"; text = ">"; ObjectID = "LUH-fq-7yE"; */ +"LUH-fq-7yE.text" = ">"; /* Class = "UILabel"; text = "E-Mail"; ObjectID = "MSp-cY-cG9"; */ "MSp-cY-cG9.text" = "メール(E-Mail)"; +/* Class = "UILabel"; text = "Edit Confirmation"; ObjectID = "Mh8-MY-tUv"; */ +"Mh8-MY-tUv.text" = "編集の確認"; + +/* Class = "UILabel"; text = "Shows how to prompt the user with a confirmation dialog before committing changes to a cell"; ObjectID = "N9S-vR-gzU"; */ +"N9S-vR-gzU.text" = "セルの内容を変更する前にダイアログを表示"; + +/* Class = "UILabel"; text = "Column Layout"; ObjectID = "NDk-U5-GbB"; */ +"NDk-U5-GbB.text" = "列のレイアウト"; + +/* Class = "UILabel"; text = ">"; ObjectID = "NbF-kJ-Na8"; */ +"NbF-kJ-Na8.text" = ">"; + +/* Class = "UINavigationItem"; title = "Custom Merging"; ObjectID = "PAA-vu-4Dw"; */ +"PAA-vu-4Dw.title" = "セル結合の応用"; + +/* Class = "UILabel"; text = "Selection Modes"; ObjectID = "Pgu-0Z-VMV"; */ +"Pgu-0Z-VMV.text" = "選択モード"; + +/* Class = "UILabel"; text = "Filters and highlights the data across all columns"; ObjectID = "Qk7-tT-4qi"; */ +"Qk7-tT-4qi.text" = "列のデータをフィルタリングして強調表示"; + +/* Class = "UILabel"; text = "Rotate the device to see star-sizing in action"; ObjectID = "QkN-hJ-IoU"; */ +"QkN-hJ-IoU.text" = "デバイスを回転させてスターサイズ機能を確認"; + +/* Class = "UIBarButtonItem"; title = "Edit"; ObjectID = "QoG-Dk-6QL"; */ +"QoG-Dk-6QL.title" = "編集"; + +/* Class = "UITableViewController"; title = "FlexGrid101"; ObjectID = "Qz0-jK-VdE"; */ +"Qz0-jK-VdE.title" = "FlexGrid101"; + /* Class = "UILabel"; text = "Country"; ObjectID = "R1X-wj-bQr"; */ "R1X-wj-bQr.text" = "国(Country)"; /* Class = "UILabel"; text = "First Name"; ObjectID = "R5M-4S-gmw"; */ "R5M-4S-gmw.text" = "名(First Name)"; +/* Class = "UILabel"; text = "Here you will see the timetable"; ObjectID = "VU5-qF-FzC"; */ +"VU5-qF-FzC.text" = "タイムテーブルが確認できます"; + +/* Class = "UILabel"; text = ">"; ObjectID = "WQg-a8-FOy"; */ +"WQg-a8-FOy.text" = ">"; + +/* Class = "UILabel"; text = "On Demand"; ObjectID = "WUb-mq-rHk"; */ +"WUb-mq-rHk.text" = "データオンデマンド"; + /* Class = "UILabel"; text = "Confirm editing"; ObjectID = "ZXh-Mv-kdZ"; */ "ZXh-Mv-kdZ.text" = "編集の完了"; +/* Class = "UINavigationItem"; title = "Edit Confirmation"; ObjectID = "Zhz-qw-39u"; */ +"Zhz-qw-39u.title" = "編集の確認"; + /* Class = "UILabel"; text = "Last Name"; ObjectID = "at8-vu-Ft0"; */ "at8-vu-Ft0.text" = "姓(Last Name)"; +/* Class = "UILabel"; text = "Select TV show"; ObjectID = "b5w-4m-Jz3"; */ +"b5w-4m-Jz3.text" = "テレビ番組を選択"; + +/* Class = "UILabel"; text = ">"; ObjectID = "bil-EV-iKd"; */ +"bil-EV-iKd.text" = ">"; + +/* Class = "UILabel"; text = "Star Sizing"; ObjectID = "cCB-Mg-zy9"; */ +"cCB-Mg-zy9.text" = "スターサイズ機能"; + +/* Class = "UILabel"; text = ">"; ObjectID = "cKR-sR-jnu"; */ +"cKR-sR-jnu.text" = ">"; + +/* Class = "UILabel"; text = "Detail Visibility Mode:"; ObjectID = "ddh-EW-zce"; */ +"ddh-EW-zce.text" = "詳細の表示モード:"; + +/* Class = "UILabel"; text = "Row Details"; ObjectID = "dsU-dQ-3PQ"; */ +"dsU-dQ-3PQ.text" = "詳細行"; + /* Class = "UILabel"; text = ">"; ObjectID = "ein-f6-TS0"; */ "ein-f6-TS0.text" = ">"; +/* Class = "UILabel"; text = ">"; ObjectID = "fAw-eT-abh"; */ +"fAw-eT-abh.text" = ">"; + +/* Class = "UINavigationItem"; title = "Row Details"; ObjectID = "fPn-ol-nxW"; */ +"fPn-ol-nxW.title" = "詳細行"; + +/* Class = "UINavigationItem"; title = "FlexGrid101"; ObjectID = "fQI-FH-RiG"; */ +"fQI-FH-RiG.title" = "FlexGrid101"; + +/* Class = "UINavigationItem"; title = "Conditional Formatting"; ObjectID = "gGM-lt-hc6"; */ +"gGM-lt-hc6.title" = "条件付き書式"; + +/* Class = "UILabel"; text = "Uses a CellFactory to apply conditional formatting"; ObjectID = "gcv-bk-jWC"; */ +"gcv-bk-jWC.text" = "条件付き書式(CellFactory 機能)"; + +/* Class = "UINavigationItem"; title = "Column Definitions"; ObjectID = "htf-Gy-By7"; */ +"htf-Gy-By7.title" = "列の定義"; + +/* Class = "UIBarButtonItem"; title = "0 selected"; ObjectID = "iIA-Df-AaM"; */ +"iIA-Df-AaM.title" = "選択無し"; + +/* Class = "UILabel"; text = "Conditional Formatting"; ObjectID = "if5-fG-b6E"; */ +"if5-fG-b6E.text" = "条件付き書式"; + +/* Class = "UINavigationItem"; title = "Editing Form"; ObjectID = "ig5-aS-Vgh"; */ +"ig5-aS-Vgh.title" = "編集画面"; + +/* Class = "UILabel"; text = "Shows frozen columns, rows and cell merging"; ObjectID = "iwq-wR-ahB"; */ +"iwq-wR-ahB.text" = "行、列のセルを結合して固定表示する方法"; + +/* Class = "UILabel"; text = ">"; ObjectID = "jaL-e6-fOw"; */ +"jaL-e6-fOw.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "k2d-IG-BPG"; */ +"k2d-IG-BPG.text" = ">"; + +/* Class = "UILabel"; text = "Filters the data by columns through a generated form"; ObjectID = "kcb-VB-G0j"; */ +"kcb-VB-G0j.text" = "列のフィルタ条件をフォームで指定"; + +/* Class = "UILabel"; text = "Getting Started"; ObjectID = "lev-La-dSM"; */ +"lev-La-dSM.text" = "FlexGrid の基本機能"; + +/* Class = "UILabel"; text = "Grouping"; ObjectID = "mTY-Nq-vjh"; */ +"mTY-Nq-vjh.text" = "グループ化"; + +/* Class = "UILabel"; text = ">"; ObjectID = "nLJ-ZY-wYK"; */ +"nLJ-ZY-wYK.text" = ">"; + +/* Class = "UILabel"; text = "Editing Form"; ObjectID = "oUW-Ec-gDn"; */ +"oUW-Ec-gDn.text" = "編集画面"; + +/* Class = "UILabel"; text = ">"; ObjectID = "pBF-A7-DwK"; */ +"pBF-A7-DwK.text" = ">"; + +/* Class = "UINavigationItem"; title = "Custom Cells"; ObjectID = "qfI-an-dEx"; */ +"qfI-an-dEx.title" = "カスタムセル"; + /* Class = "UILabel"; text = ">"; ObjectID = "r46-Kv-t99"; */ "r46-Kv-t99.text" = ">"; +/* Class = "UILabel"; text = ">"; ObjectID = "sIH-X3-Yo3"; */ +"sIH-X3-Yo3.text" = ">"; + +/* Class = "UILabel"; text = "Column Definitions"; ObjectID = "sYt-Cd-lig"; */ +"sYt-Cd-lig.text" = "列の定義"; + /* Class = "UILabel"; text = "Edit the Object"; ObjectID = "syX-hS-ICg"; */ "syX-hS-ICg.text" = "内容を編集"; + +/* Class = "UILabel"; text = "Custom Merging"; ObjectID = "tmz-Ut-Msh"; */ +"tmz-Ut-Msh.text" = "セルのマージ"; + +/* Class = "UINavigationItem"; title = "Selection Modes"; ObjectID = "ump-jf-AN4"; */ +"ump-jf-AN4.title" = "選択モード"; + +/* Class = "UINavigationController"; title = "FlexGrid101"; ObjectID = "vQy-oz-8OE"; */ +"vQy-oz-8OE.title" = "FlexGrid101"; + +/* Class = "UINavigationItem"; title = "Grouping"; ObjectID = "vfQ-bd-Mgq"; */ +"vfQ-bd-Mgq.title" = "グループ化"; + +/* Class = "UILabel"; text = "Shows a custom column manager to modify column layout"; ObjectID = "wKr-Ae-bKg"; */ +"wKr-Ae-bKg.text" = "列管理機能を利用してレイアウトを変更"; + +/* Class = "UILabel"; text = ">"; ObjectID = "wZw-ZU-IA6"; */ +"wZw-ZU-IA6.text" = ">"; + +/* Class = "UILabel"; text = "Load items on demand as the user scrolls down the grid"; ObjectID = "xhb-NF-nFn"; */ +"xhb-NF-nFn.text" = "スクロールの終端で表示データをロード"; + +/* Class = "UINavigationItem"; title = "Full Text Filter"; ObjectID = "yEw-h4-u6W"; */ +"yEw-h4-u6W.title" = "全テキストフィルタ"; + +/* Class = "UILabel"; text = "Shows how to specify and format columns"; ObjectID = "ycB-vo-am7"; */ +"ycB-vo-am7.text" = "列を指定して書式設定する方法"; + +/* Class = "UILabel"; text = "Full Text Filter"; ObjectID = "zKl-cD-EzG"; */ +"zKl-cD-EzG.text" = "全テキストフィルタ"; diff --git a/ObjectiveC/FlexPie101/FlexPie101.xcodeproj/project.pbxproj b/ObjectiveC/FlexPie101/FlexPie101.xcodeproj/project.pbxproj index 5182d30..55f2dcf 100644 --- a/ObjectiveC/FlexPie101/FlexPie101.xcodeproj/project.pbxproj +++ b/ObjectiveC/FlexPie101/FlexPie101.xcodeproj/project.pbxproj @@ -7,16 +7,28 @@ objects = { /* Begin PBXBuildFile section */ - EDE368A21C029C3000B51400 /* XuniChartCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDE3689F1C029C3000B51400 /* XuniChartCoreKit.framework */; }; - EDE368A31C029C3000B51400 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDE368A01C029C3000B51400 /* XuniCoreKit.framework */; }; - EDE368A41C029C3000B51400 /* XuniFlexPieKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDE368A11C029C3000B51400 /* XuniFlexPieKit.framework */; }; - EDE368A91C02A2DE00B51400 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = EDE368AB1C02A2DE00B51400 /* Localizable.strings */; }; + 4C87CE681D259D09009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE661D259D09009781F5 /* XuniChartCoreDynamicKit.framework */; }; + 4C87CE691D259D09009781F5 /* XuniFlexPieDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE671D259D09009781F5 /* XuniFlexPieDynamicKit.framework */; }; + 4C87CE6B1D259D46009781F5 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE6A1D259D46009781F5 /* XuniCoreDynamicKit.framework */; }; + 4C87CE6C1D259D4C009781F5 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE6A1D259D46009781F5 /* XuniCoreDynamicKit.framework */; }; + 4C87CE6D1D259D4C009781F5 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE6A1D259D46009781F5 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C87CE6E1D259D4C009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE661D259D09009781F5 /* XuniChartCoreDynamicKit.framework */; }; + 4C87CE6F1D259D4C009781F5 /* XuniChartCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE661D259D09009781F5 /* XuniChartCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C87CE701D259D4C009781F5 /* XuniFlexPieDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE671D259D09009781F5 /* XuniFlexPieDynamicKit.framework */; }; + 4C87CE711D259D4C009781F5 /* XuniFlexPieDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C87CE671D259D09009781F5 /* XuniFlexPieDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C8978D91D2688E9004E468B /* XuniFlexPieDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C8978D81D2688E9004E468B /* XuniFlexPieDesignTimeStoryboardSupport.m */; }; + 4CA1F2511CCE89C7004B1C98 /* pie_doughnut.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24A1CCE89C7004B1C98 /* pie_doughnut.png */; }; + 4CA1F2521CCE89C7004B1C98 /* pie_labels.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24B1CCE89C7004B1C98 /* pie_labels.png */; }; + 4CA1F2531CCE89C7004B1C98 /* pie_load.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24C1CCE89C7004B1C98 /* pie_load.png */; }; + 4CA1F2541CCE89C7004B1C98 /* pie_selection.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24D1CCE89C7004B1C98 /* pie_selection.png */; }; + 4CA1F2551CCE89C7004B1C98 /* pie_title.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24E1CCE89C7004B1C98 /* pie_title.png */; }; + 4CA1F2561CCE89C7004B1C98 /* pie.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F24F1CCE89C7004B1C98 /* pie.png */; }; + 4CA1F2571CCE89C7004B1C98 /* themes.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CA1F2501CCE89C7004B1C98 /* themes.png */; }; F23573651B445AAB00F300D7 /* License.m in Sources */ = {isa = PBXBuildFile; fileRef = F23573641B445AAB00F300D7 /* License.m */; }; F24016291B1646A000D4D296 /* PieChartData.m in Sources */ = {isa = PBXBuildFile; fileRef = F24016281B1646A000D4D296 /* PieChartData.m */; }; F254FABC1B31E10D009CD853 /* SnapshotController.m in Sources */ = {isa = PBXBuildFile; fileRef = F254FABB1B31E10D009CD853 /* SnapshotController.m */; }; F2A870671B15FEFF001C957B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A870661B15FEFF001C957B /* main.m */; }; F2A8706A1B15FEFF001C957B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A870691B15FEFF001C957B /* AppDelegate.m */; }; - F2A8706D1B15FEFF001C957B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A8706C1B15FEFF001C957B /* ViewController.m */; }; F2A870701B15FEFF001C957B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F2A8706E1B15FEFF001C957B /* Main.storyboard */; }; F2A870721B15FEFF001C957B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F2A870711B15FEFF001C957B /* Images.xcassets */; }; F2A870751B15FEFF001C957B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F2A870731B15FEFF001C957B /* LaunchScreen.xib */; }; @@ -38,15 +50,36 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C87CE721D259D4C009781F5 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C87CE711D259D4C009781F5 /* XuniFlexPieDynamicKit.framework in Embed Frameworks */, + 4C87CE6D1D259D4C009781F5 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C87CE6F1D259D4C009781F5 /* XuniChartCoreDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ - EDE3689F1C029C3000B51400 /* XuniChartCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreKit.framework; path = "../../../../../../../Desktop/培训材料/XuniChartCoreKit.framework"; sourceTree = ""; }; - EDE368A01C029C3000B51400 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../../../../../Desktop/培训材料/XuniCoreKit.framework"; sourceTree = ""; }; - EDE368A11C029C3000B51400 /* XuniFlexPieKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexPieKit.framework; path = "../../../../../../../Desktop/培训材料/XuniFlexPieKit.framework"; sourceTree = ""; }; - EDE368A51C029E6300B51400 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - EDE368A61C029E6300B51400 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; - EDE368AA1C02A2DE00B51400 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; - EDE368AC1C02A30100B51400 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - EDE368AD1C02A30200B51400 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + 4C37D42D1CD30E4E009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 4C37D42E1CD30E4E009113A8 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 4C87CE661D259D09009781F5 /* XuniChartCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreDynamicKit.framework; path = ../../../Controls/XuniChartCoreDynamicKit.framework; sourceTree = ""; }; + 4C87CE671D259D09009781F5 /* XuniFlexPieDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexPieDynamicKit.framework; path = ../../../Controls/XuniFlexPieDynamicKit.framework; sourceTree = ""; }; + 4C87CE6A1D259D46009781F5 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C8978D81D2688E9004E468B /* XuniFlexPieDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniFlexPieDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniFlexPieDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4CA1F24A1CCE89C7004B1C98 /* pie_doughnut.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie_doughnut.png; sourceTree = ""; }; + 4CA1F24B1CCE89C7004B1C98 /* pie_labels.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie_labels.png; sourceTree = ""; }; + 4CA1F24C1CCE89C7004B1C98 /* pie_load.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie_load.png; sourceTree = ""; }; + 4CA1F24D1CCE89C7004B1C98 /* pie_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie_selection.png; sourceTree = ""; }; + 4CA1F24E1CCE89C7004B1C98 /* pie_title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie_title.png; sourceTree = ""; }; + 4CA1F24F1CCE89C7004B1C98 /* pie.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pie.png; sourceTree = ""; }; + 4CA1F2501CCE89C7004B1C98 /* themes.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = themes.png; sourceTree = ""; }; F23573631B445AAB00F300D7 /* License.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = License.h; sourceTree = ""; }; F23573641B445AAB00F300D7 /* License.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = License.m; sourceTree = ""; }; F24016271B1646A000D4D296 /* PieChartData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieChartData.h; sourceTree = ""; }; @@ -58,8 +91,6 @@ F2A870661B15FEFF001C957B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; F2A870681B15FEFF001C957B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; F2A870691B15FEFF001C957B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - F2A8706B1B15FEFF001C957B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - F2A8706C1B15FEFF001C957B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; F2A8706F1B15FEFF001C957B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; F2A870711B15FEFF001C957B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; F2A870741B15FEFF001C957B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -83,9 +114,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EDE368A21C029C3000B51400 /* XuniChartCoreKit.framework in Frameworks */, - EDE368A31C029C3000B51400 /* XuniCoreKit.framework in Frameworks */, - EDE368A41C029C3000B51400 /* XuniFlexPieKit.framework in Frameworks */, + 4C87CE6B1D259D46009781F5 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C87CE681D259D09009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */, + 4C87CE6E1D259D4C009781F5 /* XuniChartCoreDynamicKit.framework in Frameworks */, + 4C87CE701D259D4C009781F5 /* XuniFlexPieDynamicKit.framework in Frameworks */, + 4C87CE6C1D259D4C009781F5 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C87CE691D259D09009781F5 /* XuniFlexPieDynamicKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -99,12 +133,46 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4CA1F2481CCE899C004B1C98 /* Images */ = { + isa = PBXGroup; + children = ( + 4CA1F24A1CCE89C7004B1C98 /* pie_doughnut.png */, + 4CA1F24B1CCE89C7004B1C98 /* pie_labels.png */, + 4CA1F24C1CCE89C7004B1C98 /* pie_load.png */, + 4CA1F24D1CCE89C7004B1C98 /* pie_selection.png */, + 4CA1F24E1CCE89C7004B1C98 /* pie_title.png */, + 4CA1F24F1CCE89C7004B1C98 /* pie.png */, + 4CA1F2501CCE89C7004B1C98 /* themes.png */, + ); + name = Images; + sourceTree = ""; + }; + 4CA1F2491CCE89A0004B1C98 /* Samples */ = { + isa = PBXGroup; + children = ( + F2A870991B16152D001C957B /* SelectionSampleController.h */, + F2A8709A1B16152D001C957B /* SelectionSampleController.m */, + F2A8709C1B16153F001C957B /* ThemingController.h */, + F2A8709D1B16153F001C957B /* ThemingController.m */, + F2A870961B16150C001C957B /* LegendAndTitlesController.h */, + F2A870971B16150C001C957B /* LegendAndTitlesController.m */, + F2A870931B1614F2001C957B /* BasicFeaturesController.h */, + F2A870941B1614F2001C957B /* BasicFeaturesController.m */, + F2A870901B1614C2001C957B /* GettingStartedController.h */, + F2A870911B1614C2001C957B /* GettingStartedController.m */, + F254FABA1B31E10D009CD853 /* SnapshotController.h */, + F254FABB1B31E10D009CD853 /* SnapshotController.m */, + ); + name = Samples; + sourceTree = ""; + }; F2A870581B15FEFF001C957B = { isa = PBXGroup; children = ( - EDE3689F1C029C3000B51400 /* XuniChartCoreKit.framework */, - EDE368A01C029C3000B51400 /* XuniCoreKit.framework */, - EDE368A11C029C3000B51400 /* XuniFlexPieKit.framework */, + 4C8978D81D2688E9004E468B /* XuniFlexPieDesignTimeStoryboardSupport.m */, + 4C87CE6A1D259D46009781F5 /* XuniCoreDynamicKit.framework */, + 4C87CE661D259D09009781F5 /* XuniChartCoreDynamicKit.framework */, + 4C87CE671D259D09009781F5 /* XuniFlexPieDynamicKit.framework */, F2A870631B15FEFF001C957B /* FlexPie101 */, F2A8707D1B15FF00001C957B /* FlexPie101Tests */, F2A870621B15FEFF001C957B /* Products */, @@ -123,28 +191,16 @@ F2A870631B15FEFF001C957B /* FlexPie101 */ = { isa = PBXGroup; children = ( + 4CA1F2491CCE89A0004B1C98 /* Samples */, + 4CA1F2481CCE899C004B1C98 /* Images */, F2A870681B15FEFF001C957B /* AppDelegate.h */, F2A870691B15FEFF001C957B /* AppDelegate.m */, - F2A8706B1B15FEFF001C957B /* ViewController.h */, - F2A8706C1B15FEFF001C957B /* ViewController.m */, F2A8706E1B15FEFF001C957B /* Main.storyboard */, F2A870711B15FEFF001C957B /* Images.xcassets */, F2A870731B15FEFF001C957B /* LaunchScreen.xib */, F2A870641B15FEFF001C957B /* Supporting Files */, - F2A870901B1614C2001C957B /* GettingStartedController.h */, - F2A870911B1614C2001C957B /* GettingStartedController.m */, - F2A870931B1614F2001C957B /* BasicFeaturesController.h */, - F2A870941B1614F2001C957B /* BasicFeaturesController.m */, - F2A870961B16150C001C957B /* LegendAndTitlesController.h */, - F2A870971B16150C001C957B /* LegendAndTitlesController.m */, - F2A870991B16152D001C957B /* SelectionSampleController.h */, - F2A8709A1B16152D001C957B /* SelectionSampleController.m */, - F2A8709C1B16153F001C957B /* ThemingController.h */, - F2A8709D1B16153F001C957B /* ThemingController.m */, F24016271B1646A000D4D296 /* PieChartData.h */, F24016281B1646A000D4D296 /* PieChartData.m */, - F254FABA1B31E10D009CD853 /* SnapshotController.h */, - F254FABB1B31E10D009CD853 /* SnapshotController.m */, F23573631B445AAB00F300D7 /* License.h */, F23573641B445AAB00F300D7 /* License.m */, ); @@ -154,7 +210,6 @@ F2A870641B15FEFF001C957B /* Supporting Files */ = { isa = PBXGroup; children = ( - EDE368AB1C02A2DE00B51400 /* Localizable.strings */, F2A870651B15FEFF001C957B /* Info.plist */, F2A870661B15FEFF001C957B /* main.m */, ); @@ -188,6 +243,7 @@ F2A8705D1B15FEFF001C957B /* Sources */, F2A8705E1B15FEFF001C957B /* Frameworks */, F2A8705F1B15FEFF001C957B /* Resources */, + 4C87CE721D259D4C009781F5 /* Embed Frameworks */, ); buildRules = ( ); @@ -258,10 +314,16 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4CA1F2531CCE89C7004B1C98 /* pie_load.png in Resources */, F2A870701B15FEFF001C957B /* Main.storyboard in Resources */, - EDE368A91C02A2DE00B51400 /* Localizable.strings in Resources */, F2A870751B15FEFF001C957B /* LaunchScreen.xib in Resources */, + 4CA1F2511CCE89C7004B1C98 /* pie_doughnut.png in Resources */, F2A870721B15FEFF001C957B /* Images.xcassets in Resources */, + 4CA1F2571CCE89C7004B1C98 /* themes.png in Resources */, + 4CA1F2521CCE89C7004B1C98 /* pie_labels.png in Resources */, + 4CA1F2561CCE89C7004B1C98 /* pie.png in Resources */, + 4CA1F2541CCE89C7004B1C98 /* pie_selection.png in Resources */, + 4CA1F2551CCE89C7004B1C98 /* pie_title.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -280,12 +342,12 @@ buildActionMask = 2147483647; files = ( F2A870951B1614F2001C957B /* BasicFeaturesController.m in Sources */, - F2A8706D1B15FEFF001C957B /* ViewController.m in Sources */, F2A8706A1B15FEFF001C957B /* AppDelegate.m in Sources */, F2A870921B1614C2001C957B /* GettingStartedController.m in Sources */, F2A870671B15FEFF001C957B /* main.m in Sources */, F254FABC1B31E10D009CD853 /* SnapshotController.m in Sources */, F23573651B445AAB00F300D7 /* License.m in Sources */, + 4C8978D91D2688E9004E468B /* XuniFlexPieDesignTimeStoryboardSupport.m in Sources */, F24016291B1646A000D4D296 /* PieChartData.m in Sources */, F2A8709B1B16152D001C957B /* SelectionSampleController.m in Sources */, F2A8709E1B16153F001C957B /* ThemingController.m in Sources */, @@ -312,22 +374,11 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - EDE368AB1C02A2DE00B51400 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - EDE368AA1C02A2DE00B51400 /* ja */, - EDE368AC1C02A30100B51400 /* en */, - EDE368AD1C02A30200B51400 /* Base */, - ); - name = Localizable.strings; - path = ..; - sourceTree = ""; - }; F2A8706E1B15FEFF001C957B /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( F2A8706F1B15FEFF001C957B /* Base */, - EDE368A51C029E6300B51400 /* ja */, + 4C37D42D1CD30E4E009113A8 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -336,7 +387,7 @@ isa = PBXVariantGroup; children = ( F2A870741B15FEFF001C957B /* Base */, - EDE368A61C029E6300B51400 /* ja */, + 4C37D42E1CD30E4E009113A8 /* ja */, ); name = LaunchScreen.xib; sourceTree = ""; @@ -436,9 +487,9 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", ../../../Controls, + ../../../../Controls, ); INFOPLIST_FILE = FlexPie101/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; "OTHER_LDFLAGS[arch=*]" = "-all_load"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -455,9 +506,9 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", ../../../Controls, + ../../../../Controls, ); INFOPLIST_FILE = FlexPie101/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; "OTHER_LDFLAGS[arch=*]" = "-all_load"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/ObjectiveC/FlexPie101/FlexPie101/AppDelegate.m b/ObjectiveC/FlexPie101/FlexPie101/AppDelegate.m index 65d8665..e82e9e2 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/AppDelegate.m +++ b/ObjectiveC/FlexPie101/FlexPie101/AppDelegate.m @@ -6,7 +6,7 @@ // #import "AppDelegate.h" -#import "XuniCoreKit/XuniCoreKit.h" +@import XuniCoreDynamicKit; #import "License.h" @interface AppDelegate () diff --git a/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/LaunchScreen.xib b/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/LaunchScreen.xib index d51c34e..ca288e4 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/LaunchScreen.xib +++ b/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/LaunchScreen.xib @@ -1,41 +1,39 @@ - + - + + - - + + - - + - - - - - - + + + + + + - - - diff --git a/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/Main.storyboard b/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/Main.storyboard index 63b7c0b..5087f69 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/Main.storyboard +++ b/ObjectiveC/FlexPie101/FlexPie101/Base.lproj/Main.storyboard @@ -1,64 +1,12 @@ - + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -69,14 +17,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -87,14 +64,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -105,14 +178,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -123,14 +254,35 @@ + + + + + + + + + + + + + + + + + + + + + - + - + @@ -141,14 +293,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -159,12 +340,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ObjectiveC/FlexPie101/FlexPie101/BasicFeaturesController.m b/ObjectiveC/FlexPie101/FlexPie101/BasicFeaturesController.m index 16a73e4..0bc915c 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/BasicFeaturesController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/BasicFeaturesController.m @@ -6,9 +6,16 @@ // #import "BasicFeaturesController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" + @interface BasicFeaturesController () +@property (weak, nonatomic) IBOutlet UIStepper *stepper; +@property (weak, nonatomic) IBOutlet UILabel *innerRadiusLabel; +@property (weak, nonatomic) IBOutlet UISlider *offsetSlider; +@property (weak, nonatomic) IBOutlet UISlider *startAngleSlider; +@property (weak, nonatomic) IBOutlet UISwitch *reversedSwitch; +@property (weak, nonatomic) IBOutlet FlexPie *pieChart; @end @@ -16,136 +23,43 @@ @implementation BasicFeaturesController - (void)viewDidLoad { [super viewDidLoad]; - self.edgesForExtendedLayout = UIRectEdgeNone; - UILabel *innerRadiusLabel =[[UILabel alloc] init]; - UIStepper *stepper=[[UIStepper alloc] init]; - UILabel *offsetLabel =[[UILabel alloc] init]; - UISlider *offsetSlider = [[UISlider alloc]init]; - UILabel *startAngleLabel =[[UILabel alloc] init]; - UISlider *startAngleSlider = [[UISlider alloc]init]; - UILabel *reversedLabel =[[UILabel alloc] init]; - UISwitch *reversedSwitch = [[UISwitch alloc]init]; - FlexPie *pieChart = [[FlexPie alloc] init]; - NSMutableArray *pieData = [PieChartData demoData]; - - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - - stepper.maximumValue = .99; - stepper.minimumValue = 0; - stepper.value = 0; - stepper.stepValue = .1; - [stepper addTarget:self action:@selector(stepperClicked:) forControlEvents:UIControlEventValueChanged]; - - innerRadiusLabel.text = [NSLocalizedString(@"inner radius", nil) stringByAppendingString:[NSString stringWithFormat:@"%1.1f", stepper.value]]; - [innerRadiusLabel sizeToFit]; - - offsetLabel.text = NSLocalizedString(@"offset", nil); - [offsetSlider addTarget:self action:@selector(offsetSliderChanged:) forControlEvents:UIControlEventValueChanged]; - offsetSlider.minimumValue = 0.0; - offsetSlider.maximumValue = 1.0; - - startAngleLabel.text = NSLocalizedString(@"start angle", nil); - - [startAngleSlider addTarget:self action:@selector(startAngleSliderChanged:) forControlEvents:UIControlEventValueChanged]; - startAngleSlider.minimumValue = 0.0; - startAngleSlider.maximumValue = 360.0; - - reversedLabel.text = NSLocalizedString(@"Reversed?", nil); - [reversedSwitch addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; + NSMutableArray *pieData = [PieChartData demoData]; - pieChart.tag = 1; - innerRadiusLabel.tag = 2; - stepper.tag = 3; - offsetLabel.tag = 4; - offsetSlider.tag = 5; - startAngleLabel.tag = 6; - startAngleSlider.tag = 7; - reversedLabel.tag = 8; - reversedSwitch.tag = 9; + self.pieChart.binding = @"value"; + self.pieChart.bindingName = @"name"; + self.pieChart.itemsSource = pieData; - [self.view addSubview:pieChart]; - [self.view addSubview:stepper]; - [self.view addSubview:innerRadiusLabel]; - [self.view addSubview:reversedLabel]; - [self.view addSubview:reversedSwitch]; - [self.view addSubview:offsetLabel]; - [self.view addSubview:offsetSlider]; - [self.view addSubview:startAngleLabel]; - [self.view addSubview:startAngleSlider]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart = (FlexPie*)[self.view viewWithTag:1]; - UILabel *innerRadiusLabel = (UILabel*)[self.view viewWithTag:2]; - UIStepper *stepper = (UIStepper*)[self.view viewWithTag:3]; - UILabel *offsetLabel = (UILabel*)[self.view viewWithTag:4]; - UISlider *offsetSlider = (UISlider*)[self.view viewWithTag:5]; - UILabel *startAngleLabel = (UILabel*)[self.view viewWithTag:6]; - UISlider *startAngleSlider = (UISlider*)[self.view viewWithTag:7]; - UILabel *reversedLabel = (UILabel*)[self.view viewWithTag:8]; - UISwitch *reversedSwitch = (UISwitch*)[self.view viewWithTag:9]; - innerRadiusLabel.frame = CGRectMake(5, 5, 100, 50); - [innerRadiusLabel sizeToFit]; - stepper.frame = CGRectMake(self.view.bounds.size.width/2 - 25, 5, 50, 50); - offsetLabel.frame = CGRectMake(5, self.view.bounds.size.height/8, 100, 50); - offsetSlider.frame = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height/8, self.view.bounds.size.width/2 -5, 50); - startAngleLabel.frame = CGRectMake(5, self.view.bounds.size.height/4, 100, 50); - startAngleSlider.frame = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height/4, self.view.bounds.size.width/2 -5, 50); - reversedLabel.frame = CGRectMake(5, self.view.bounds.size.height*3/8, 100, 50); - reversedSwitch.frame = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height*3/8, 50, 50); - pieChart.frame = CGRectMake(0, self.view.bounds.size.height/2, self.view.bounds.size.width, self.view.bounds.size.height/2); -} - --(void)stepperClicked:(id) sender{ - UIStepper *stepper =(UIStepper*)sender; - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - UILabel *innerRadiusLabel = (UILabel*) [self.view viewWithTag:2]; +- (IBAction)switchValueChanged:(id)sender { - pie.innerRadius = stepper.value; - innerRadiusLabel.text = [NSLocalizedString(@"inner radius", nil) stringByAppendingString:[NSString stringWithFormat:@"%1.1f", stepper.value]]; - [innerRadiusLabel sizeToFit]; -} - --(void)switchChanged:(UISwitch *) switchState{ - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - + UISwitch* switchState = (UISwitch*)sender; if ([switchState isOn]) { - pie.reversed = true; + self.pieChart.reversed = true; } else { - pie.reversed = false; + self.pieChart.reversed = false; } } --(void)offsetSliderChanged:(id) sender{ - UISlider *slider =(UISlider*)sender; - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - pie.offset = slider.value; +- (IBAction)valueChanged:(id)sender { + UIStepper *stepper =(UIStepper*)sender; + + self.pieChart.innerRadius = stepper.value; + self.innerRadiusLabel.text = [NSString stringWithFormat:@"%1.1f", stepper.value]; + [self.innerRadiusLabel sizeToFit]; } --(void)startAngleSliderChanged:(id) sender{ + +- (IBAction)offsetChanged:(id)sender { UISlider *slider =(UISlider*)sender; - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - pie.startAngle = slider.value; + self.pieChart.offset = slider.value; } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +- (IBAction)startAngleChanged:(id)sender { + UISlider *slider =(UISlider*)sender; + self.pieChart.startAngle = slider.value; } -*/ @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/GettingStartedController.m b/ObjectiveC/FlexPie101/FlexPie101/GettingStartedController.m index 705f2d6..c363476 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/GettingStartedController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/GettingStartedController.m @@ -6,10 +6,12 @@ // #import "GettingStartedController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" @interface GettingStartedController () +@property (weak, nonatomic) IBOutlet FlexPie *pieChart; +@property (weak, nonatomic) IBOutlet FlexPie *donutChart; @end @@ -20,24 +22,17 @@ - (void)viewDidLoad { self.edgesForExtendedLayout = UIRectEdgeNone; // Do any additional setup after loading the view. - FlexPie *pieChart = [[FlexPie alloc] init]; - FlexPie *donutChart = [[FlexPie alloc] init]; NSMutableArray *pieData = [PieChartData demoData]; - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - pieChart.tooltip.isVisible = true; - donutChart.binding = @"value"; - donutChart.bindingName = @"name"; - donutChart.itemsSource = pieData; - donutChart.tooltip.isVisible = true; - donutChart.innerRadius = 0.6; - pieChart.tag = 1; - donutChart.tag = 2; - - [self.view addSubview:pieChart]; - [self.view addSubview:donutChart]; + self.pieChart.binding = @"value"; + self.pieChart.bindingName = @"name"; + self.pieChart.itemsSource = pieData; + self.pieChart.tooltip.isVisible = true; + self.donutChart.binding = @"value"; + self.donutChart.bindingName = @"name"; + self.donutChart.itemsSource = pieData; + self.donutChart.tooltip.isVisible = true; + self.donutChart.innerRadius = 0.6; } @@ -46,20 +41,5 @@ - (void)didReceiveMemoryWarning { // Dispose of any resources that can be recreated. } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart= (FlexPie*)[self.view viewWithTag:1]; - FlexPie *donutChart = (FlexPie*)[self.view viewWithTag:2]; - pieChart.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height/3); - donutChart.frame = CGRectMake(0, self.view.bounds.size.height/2, self.view.bounds.size.width, self.view.bounds.size.height/3); -}/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/Images.xcassets/AppIcon.appiconset/Contents.json b/ObjectiveC/FlexPie101/FlexPie101/Images.xcassets/AppIcon.appiconset/Contents.json index f16c8c3..c4071ec 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ObjectiveC/FlexPie101/FlexPie101/Images.xcassets/AppIcon.appiconset/Contents.json @@ -67,6 +67,11 @@ "idiom" : "ipad", "filename" : "Icon-76@2x.png", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.h b/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.h index b639561..c1c891a 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.h +++ b/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.h @@ -7,6 +7,6 @@ #import -@interface LegendAndTitlesController : UIViewController +@interface LegendAndTitlesController : UIViewController @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.m b/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.m index 832fe57..1559dc3 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/LegendAndTitlesController.m @@ -6,111 +6,22 @@ // #import "LegendAndTitlesController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" -@interface LegendAndTitlesController (){ - NSMutableArray *pickerData; - UITextField *_headerField; - UITextField *_footerField; -} +@interface LegendAndTitlesController () +@property (weak, nonatomic) IBOutlet UITextField *footerField; +@property (weak, nonatomic) IBOutlet UITextField *headerField; +@property (weak, nonatomic) IBOutlet UISegmentedControl *legendModeSelector; +@property (weak, nonatomic) IBOutlet FlexPie *flexPie; + @end @implementation LegendAndTitlesController -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - UIPickerView *pickerView; - - UILabel *headerLabel = [[UILabel alloc] init]; - _headerField = [[UITextField alloc] init]; - - UILabel *footerLabel = [[UILabel alloc] init]; - _footerField = [[UITextField alloc] init]; - pickerData =[[NSMutableArray alloc] initWithObjects:NSLocalizedString(@"None", nil),NSLocalizedString(@"Left", nil) , NSLocalizedString(@"Top", nil),NSLocalizedString(@"Right", nil), NSLocalizedString(@"Bottom", nil), nil]; - - UILabel *legendlabel = [[UILabel alloc] init]; - pickerView = [[UIPickerView alloc] init]; - - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; - [pickerView selectRow:3 inComponent:0 animated:false]; - - headerLabel.text = NSLocalizedString(@"header", nil); - footerLabel.text = NSLocalizedString(@"footer", nil);; - legendlabel.text = NSLocalizedString(@"legend position", nil); - - _headerField.delegate = self; - _headerField.text = NSLocalizedString(@"Fruit By Value", nil); - _headerField.returnKeyType = UIReturnKeyDone; - _headerField.keyboardType = UIKeyboardTypeDefault; - _headerField.backgroundColor = [UIColor lightGrayColor]; - - _footerField.delegate = self; - _footerField.text = NSLocalizedString(@"GrapeCity inc.", nil); - _footerField.returnKeyType = UIReturnKeyDone; - _footerField.keyboardType = UIKeyboardTypeDefault; - _footerField.backgroundColor = [UIColor lightGrayColor]; - - FlexPie *pieChart = [[FlexPie alloc] init]; - NSMutableArray *pieData = [PieChartData demoData]; - pieChart.legend.position = XuniChartLegendPositionRight; - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - pieChart.tooltip.isVisible = true; - pieChart.header = _headerField.text; - pieChart.footer = _footerField.text; - [pieChart sizeToFit]; - - pieChart.tag = 1; - headerLabel.tag = 2; - footerLabel.tag = 3; - legendlabel.tag = 4; - pickerView.tag = 5; - - [self.view addSubview:pieChart]; - [self.view addSubview:headerLabel]; - [self.view addSubview:footerLabel]; - [self.view addSubview:legendlabel]; - [self.view addSubview:pickerView]; - [self.view addSubview:_headerField]; - [self.view addSubview:_footerField]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart = (FlexPie*)[self.view viewWithTag:1]; - UILabel *headerLabel = (UILabel*)[self.view viewWithTag:2]; - UILabel *footerLabel = (UILabel*)[self.view viewWithTag:3]; - UILabel *legendLabel = (UILabel*)[self.view viewWithTag:4]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:5]; - _headerField. frame = CGRectMake(0, 115, self.view.bounds.size.width/2 - 10, 50); - _footerField.frame = CGRectMake(self.view.bounds.size.width/2, 115, self.view.bounds.size.width/2 - 10, 50); - pieChart.frame = CGRectMake(self.view.bounds.size.width/4, 215, self.view.bounds.size.width*3/4, self.view.bounds.size.height - 215); - headerLabel.frame = CGRectMake(0, 65, self.view.bounds.size.width/2 , 50); - footerLabel.frame = CGRectMake(self.view.bounds.size.width/2, 65, self.view.bounds.size.width/2, 50); - legendLabel.frame = CGRectMake(0, 165, self.view.bounds.size.width/2, 50); - pickerView.frame = CGRectMake(0, 215, self.view.bounds.size.width/4, 162); -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - return [pickerData count]; -} - -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexPie *pie = (FlexPie*)[self.view viewWithTag:1]; +- (IBAction)changeLegendMode:(id)sender { + FlexPie *pie = self.flexPie; + int row = self.legendModeSelector.selectedSegmentIndex; if (row == 0) { pie.legend.position = XuniChartLegendPositionNone; } @@ -128,41 +39,33 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } } -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - return [pickerData objectAtIndex:row]; -} --(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ - return true; -} --(void)textFieldDidBeginEditing:(UITextField *)textField{ +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + + self.legendModeSelector.selectedSegmentIndex = 3; + + NSMutableArray *pieData = [PieChartData demoData]; + self.flexPie.legend.position = XuniChartLegendPositionRight; + self.flexPie.binding = @"value"; + self.flexPie.bindingName = @"name"; + self.flexPie.itemsSource = pieData; + self.flexPie.tooltip.isVisible = true; + self.flexPie.header = self.headerField.text; + self.flexPie.footer = self.footerField.text; -} --(BOOL)textFieldShouldEndEditing:(UITextField *)textField{ - return true; -} --(void)textFieldDidEndEditing:(UITextField *)textField{ - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - pie.header = _headerField.text; - pie.footer = _footerField.text; } --(BOOL)textFieldShouldReturn:(UITextField *)textField{ - [textField resignFirstResponder]; - return true; +- (IBAction)endEdit:(id)sender { + [(UITextField*)sender resignFirstResponder]; } --(void)headerFieldChanged:(id) sender{ - UITextField *headerField =(UITextField*)sender; - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - pie.header = headerField.text; + +- (IBAction)edited:(id)sender { + self.flexPie.header = self.headerField.text; + self.flexPie.footer = self.footerField.text; } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ + @end \ No newline at end of file diff --git a/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.h b/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.h index 10b6ac2..880486d 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.h +++ b/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.h @@ -7,6 +7,6 @@ #import -@interface SelectionSampleController : UIViewController +@interface SelectionSampleController : UIViewController @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.m b/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.m index 27de5fe..4137425 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/SelectionSampleController.m @@ -6,109 +6,22 @@ // #import "SelectionSampleController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" @interface SelectionSampleController (){ NSMutableArray *pickerData; } +@property (weak, nonatomic) IBOutlet UILabel *offsetLabel; +@property (weak, nonatomic) IBOutlet UISwitch *isAnimatedSwitch; +@property (weak, nonatomic) IBOutlet UISegmentedControl *positionSelector; +@property (weak, nonatomic) IBOutlet FlexPie *flexPie; +@property (weak, nonatomic) IBOutlet UIStepper *stepper; @end @implementation SelectionSampleController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - UIPickerView *pickerView = [[UIPickerView alloc] init]; - pickerData =[[NSMutableArray alloc] initWithObjects:NSLocalizedString(@"None", nil),NSLocalizedString(@"Left", nil) , NSLocalizedString(@"Top", nil),NSLocalizedString(@"Right", nil), NSLocalizedString(@"Bottom", nil), nil]; - UILabel *offsetLabel = [[UILabel alloc] init]; - UILabel *positionLabel = [[UILabel alloc] init]; - UILabel *isAnimatedLabel = [[UILabel alloc] init]; - UIStepper *stepper = [[UIStepper alloc] init]; - UISwitch *isAnimatedSwitch = [[UISwitch alloc]init]; - - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; - [pickerView selectRow:4 inComponent:0 animated:false]; - - [isAnimatedSwitch addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; - stepper.maximumValue = .5; - stepper.minimumValue = 0; - stepper.value = .2; - stepper.stepValue = .1; - [stepper addTarget:self action:@selector(stepperClicked:) forControlEvents:UIControlEventValueChanged]; - - FlexPie *pieChart = [[FlexPie alloc] init]; - NSMutableArray *pieData = [PieChartData demoData]; - - offsetLabel.tag = 2; - offsetLabel.text = [NSLocalizedString(@"Selected Item offset", nil) stringByAppendingString:[NSString stringWithFormat:@"%1.1f", stepper.value]]; - - positionLabel.text = NSLocalizedString(@"position", nil); - - isAnimatedLabel.text = NSLocalizedString(@"animation", nil); - - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - pieChart.tooltip.isVisible = true; - pieChart.selectedItemOffset = stepper.value; - pieChart.selectedItemPosition = XuniPositionBottom; - pieChart.isAnimated = false; - - pieChart.tag = 1; - offsetLabel.tag = 2; - positionLabel.tag = 3; - isAnimatedLabel.tag = 4; - stepper.tag = 5; - pickerView.tag = 6; - isAnimatedSwitch.tag = 7; - - [self.view addSubview:pickerView]; - [self.view addSubview:isAnimatedSwitch]; - [self.view addSubview:stepper]; - [self.view addSubview:pieChart]; - [self.view addSubview:offsetLabel]; - [self.view addSubview:positionLabel]; - [self.view addSubview:isAnimatedLabel]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart = (FlexPie*)[self.view viewWithTag:1]; - UILabel *offsetLabel = (UILabel*)[self.view viewWithTag:2]; - UILabel *positionLabel = (UILabel*)[self.view viewWithTag:3]; - UILabel *isAnimatedLabel = (UILabel*)[self.view viewWithTag:4]; - UIStepper *stepper = (UIStepper*)[self.view viewWithTag:5]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:6]; - UISwitch *isAnimatedSwitch = (UISwitch*)[self.view viewWithTag:7]; - offsetLabel.frame = CGRectMake(0, 65, self.view.bounds.size.width/2, 50); - [offsetLabel sizeToFit]; - positionLabel.frame = CGRectMake(0, 115, self.view.bounds.size.width/4, 50); - [positionLabel sizeToFit]; - isAnimatedLabel.frame = CGRectMake(self.view.bounds.size.width/2, 115, self.view.bounds.size.width/4, 50); - [isAnimatedLabel sizeToFit]; - stepper.frame = CGRectMake(self.view.bounds.size.width * 5/8, 65, self.view.bounds.size.width/4, 50); - pickerView.frame = CGRectMake(0, 165, self.view.bounds.size.width/4, 162); - isAnimatedSwitch.frame = CGRectMake((self.view.bounds.size.width * 3/4) + 5, 115, 50, 50); - pieChart.frame = CGRectMake(self.view.bounds.size.width/4, 165, self.view.bounds.size.width*3/4, self.view.bounds.size.height-165); -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 1; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - return [pickerData count]; -} - -- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexPie *pie = (FlexPie*)[self.view viewWithTag:1]; +- (IBAction)positionChanged:(id)sender { + FlexPie *pie = self.flexPie; + int row = self.positionSelector.selectedSegmentIndex; if (row == 0) { pie.selectedItemPosition = XuniPositionNone; } @@ -126,38 +39,41 @@ - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComp } } -- (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - return [pickerData objectAtIndex:row]; -} - --(void)stepperClicked:(id) sender{ - UIStepper *stepper =(UIStepper*)sender; - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; - UILabel *offsetLabel = (UILabel*) [self.view viewWithTag:2]; +- (void)viewDidLoad { + [super viewDidLoad]; + self.positionSelector.selectedSegmentIndex = 4; + + NSMutableArray *pieData = [PieChartData demoData]; + + self.offsetLabel.text = [NSString stringWithFormat:@"%1.1f", self.stepper.value]; - pie.selectedItemOffset = stepper.value; - offsetLabel.text = [NSLocalizedString(@"offset", nil) stringByAppendingString:[NSString stringWithFormat:@"%1.1f", stepper.value]]; - [offsetLabel sizeToFit]; + self.flexPie.binding = @"value"; + self.flexPie.bindingName = @"name"; + self.flexPie.itemsSource = pieData; + self.flexPie.tooltip.isVisible = true; + self.flexPie.selectedItemOffset = self.stepper.value; + self.flexPie.selectedItemPosition = XuniPositionBottom; + self.flexPie.isAnimated = false; + } --(void)switchChanged:(UISwitch *) switchState{ - FlexPie *pie = (FlexPie*) [self.view viewWithTag:1]; + +- (IBAction)switchAnimation:(id)sender { - if ([switchState isOn]) { - pie.isAnimated = true; + if ([self.isAnimatedSwitch isOn]) { + self.flexPie.isAnimated = true; } else { - pie.isAnimated = false; + self.flexPie.isAnimated = false; } } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +-(IBAction)stepperClicked:(id) sender{ + UIStepper *stepper =(UIStepper*)sender; + self.flexPie.selectedItemOffset = stepper.value; + self.offsetLabel.text = [NSString stringWithFormat:@"%1.1f", stepper.value]; + [self.offsetLabel sizeToFit]; } -*/ + @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/SnapshotController.m b/ObjectiveC/FlexPie101/FlexPie101/SnapshotController.m index 2c90759..1268154 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/SnapshotController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/SnapshotController.m @@ -6,75 +6,48 @@ // #import "SnapshotController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" @interface SnapshotController () +@property (weak, nonatomic) IBOutlet FlexPie *flexPie; @end @implementation SnapshotController +- (IBAction)doTakeSnapshot:(id)sender { + UIImage *image = [[UIImage alloc] init]; + image = [UIImage imageWithData:[self.flexPie getImage]]; + UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotoAlbum:finishedSavingWithError:contextInfo:), nil); +} - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. - - UIButton *snapshotButton = [UIButton buttonWithType:UIButtonTypeSystem]; - [snapshotButton setTitle:NSLocalizedString(@"Take a snapshot", nil) forState:UIControlStateNormal]; - [snapshotButton addTarget:self action:@selector(snapshotButtonClicked) forControlEvents:UIControlEventTouchUpInside]; - FlexPie *pieChart = [[FlexPie alloc] init]; + + NSMutableArray *pieData = [PieChartData demoData]; - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - pieChart.tooltip.isVisible = true; - pieChart.tag = 1; - snapshotButton.tag = 2; - [self.view addSubview:snapshotButton]; - [self.view addSubview:pieChart]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + self.flexPie.binding = @"value"; + self.flexPie.bindingName = @"name"; + self.flexPie.itemsSource = pieData; + self.flexPie.tooltip.isVisible = true; + } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart= (FlexPie*)[self.view viewWithTag:1]; - UIButton *snapshotButton = (UIButton*)[self.view viewWithTag:2]; - pieChart.frame = CGRectMake(5, self.view.bounds.size.height/3, self.view.bounds.size.width-10, self.view.bounds.size.height/2); - snapshotButton.frame = CGRectMake(0, 65, self.view.bounds.size.width, 50); -} --(void)snapshotButtonClicked{ - FlexPie *pie = (FlexPie*)[self.view viewWithTag:1]; - UIImage *image = [[UIImage alloc] init]; - image = [UIImage imageWithData:[pie getImage]]; - UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotoAlbum:finishedSavingWithError:contextInfo:), nil); -} -(void)imageSavedToPhotoAlbum:(UIImage *)image finishedSavingWithError: (NSError *)error contextInfo:(void *)contextInfo{ NSString *message; NSString *title; if (!error) { - title = NSLocalizedString(@"Success", nil); - message = NSLocalizedString(@"Image was saved to Camera Roll successfully", nil); + title = @"Success"; + message = @"Image was saved to Camera Roll succesfully"; } else{ - title = NSLocalizedString(@"Failure", nil); + title = @"Failure"; message = [error description]; } - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil]; + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/ThemingController.m b/ObjectiveC/FlexPie101/FlexPie101/ThemingController.m index 39d51cd..1e682dc 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/ThemingController.m +++ b/ObjectiveC/FlexPie101/FlexPie101/ThemingController.m @@ -6,57 +6,38 @@ // #import "ThemingController.h" -#import "XuniFlexPieKit/XuniFlexPieKit.h" +@import XuniFlexPieDynamicKit; #import "PieChartData.h" @interface ThemingController (){ NSMutableArray *pickerData; } +@property (weak, nonatomic) IBOutlet UIPickerView *pickerView; +@property (weak, nonatomic) IBOutlet FlexPie *pieChart; @end @implementation ThemingController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. - UIPickerView *pickerView; + pickerData =[[NSMutableArray alloc] initWithObjects:@"Standard", @"Cocoa", @"Coral", @"Dark", @"HighContrast", @"Light", @"Midnight", @"Minimal", @"Modern", @"Organic", @"Slate", @"Zen", @"Cyborg", @"Superhero", @"Flatly", @"Darkly", @"Cerulean", nil]; - - pickerView = [[UIPickerView alloc] init]; - pickerView.delegate = self; - pickerView.showsSelectionIndicator = YES; - pickerView.hidden = false; + self.pickerView.delegate = self; + self.pickerView.showsSelectionIndicator = YES; + self.pickerView.hidden = false; - FlexPie *pieChart = [[FlexPie alloc] init]; NSMutableArray *pieData = [PieChartData demoData]; - pieChart.binding = @"value"; - pieChart.bindingName = @"name"; - pieChart.itemsSource = pieData; - pieChart.tooltip.isVisible = true; + self.pieChart.binding = @"value"; + self.pieChart.bindingName = @"name"; + self.pieChart.itemsSource = pieData; + self.pieChart.tooltip.isVisible = true; - pieChart.tag = 1; - pickerView.tag = 2; - [self.view addSubview:pieChart]; - [self.view addSubview:pickerView]; - -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. } --(void)viewDidLayoutSubviews{ - [super viewDidLayoutSubviews]; - FlexPie *pieChart= (FlexPie*)[self.view viewWithTag:1]; - UIPickerView *pickerView = (UIPickerView*)[self.view viewWithTag:2]; - pieChart.frame = CGRectMake(0, 227, self.view.bounds.size.width, (self.view.bounds.size.height-227)); - pickerView.frame = CGRectMake(self.view.bounds.size.width/4, 65, self.view.bounds.size.width/2, 162); -} - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ return 1; @@ -68,7 +49,7 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSIn - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - FlexPie *chart = (FlexPie*)[self.view viewWithTag:1]; + FlexPie *chart = self.pieChart; switch (row) { case 0: chart.palette = [XuniPalettes standard]; @@ -131,14 +112,5 @@ - (NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row fo } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/LaunchScreen.strings b/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/LaunchScreen.strings index b4cb146..5d273f0 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/LaunchScreen.strings +++ b/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ -/* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +/* Class = "UILabel"; text = " Copyright (c) 2016 GrapeCity. All rights reserved."; ObjectID = "Ewm-Nq-Jr5"; */ +"Ewm-Nq-Jr5.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; -/* Class = "UILabel"; text = "FlexPie101"; ObjectID = "kId-c2-rCX"; */ -"kId-c2-rCX.text" = "FlexPie101"; +/* Class = "UILabel"; text = "FlexPie101"; ObjectID = "R6A-MA-tzU"; */ +"R6A-MA-tzU.text" = "FlexPie101"; diff --git a/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/Main.strings b/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/Main.strings index ec4ead1..86904eb 100644 --- a/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/Main.strings +++ b/ObjectiveC/FlexPie101/FlexPie101/ja.lproj/Main.strings @@ -1,6 +1,147 @@ -/* Class = "UINavigationItem"; title = "FlexPie101"; ObjectID = "CxN-2v-3D3"; */ -"CxN-2v-3D3.title" = "FlexPie101"; +/* Class = "UISegmentedControl"; 2us-aM-jrr.segmentTitles[0] = "None"; ObjectID = "2us-aM-jrr"; */ +"2us-aM-jrr.segmentTitles[0]" = "None"; -/* Class = "UIBarButtonItem"; title = "FlexPie101"; ObjectID = "QaC-o2-yIE"; */ -"QaC-o2-yIE.title" = "FlexPie101"; +/* Class = "UISegmentedControl"; 2us-aM-jrr.segmentTitles[1] = "Left"; ObjectID = "2us-aM-jrr"; */ +"2us-aM-jrr.segmentTitles[1]" = "Left"; + +/* Class = "UISegmentedControl"; 2us-aM-jrr.segmentTitles[2] = "Top"; ObjectID = "2us-aM-jrr"; */ +"2us-aM-jrr.segmentTitles[2]" = "Top"; + +/* Class = "UISegmentedControl"; 2us-aM-jrr.segmentTitles[3] = "Right"; ObjectID = "2us-aM-jrr"; */ +"2us-aM-jrr.segmentTitles[3]" = "Right"; + +/* Class = "UISegmentedControl"; 2us-aM-jrr.segmentTitles[4] = "Bottom"; ObjectID = "2us-aM-jrr"; */ +"2us-aM-jrr.segmentTitles[4]" = "Bottom"; + +/* Class = "UINavigationItem"; title = "Getting Started"; ObjectID = "3Mg-95-lOi"; */ +"3Mg-95-lOi.title" = "Getting Started"; + +/* Class = "UITextField"; placeholder = "Footer"; ObjectID = "4Ll-o1-7jf"; */ +"4Ll-o1-7jf.placeholder" = "Footer"; + +/* Class = "UITextField"; placeholder = "Header"; ObjectID = "5Se-IW-ha4"; */ +"5Se-IW-ha4.placeholder" = "Header"; + +/* Class = "UILabel"; text = "Selection Sample"; ObjectID = "8Om-IZ-3gS"; */ +"8Om-IZ-3gS.text" = "Selection Sample"; + +/* Class = "UILabel"; text = "Shows inner radius, offset, and start angle"; ObjectID = "AGA-yF-HJh"; */ +"AGA-yF-HJh.text" = "Shows inner radius, offset, and start angle"; + +/* Class = "UILabel"; text = ">"; ObjectID = "D6b-d8-OFZ"; */ +"D6b-d8-OFZ.text" = ">"; + +/* Class = "UISegmentedControl"; EYX-qw-RJW.segmentTitles[0] = "None"; ObjectID = "EYX-qw-RJW"; */ +"EYX-qw-RJW.segmentTitles[0]" = "None"; + +/* Class = "UISegmentedControl"; EYX-qw-RJW.segmentTitles[1] = "Left"; ObjectID = "EYX-qw-RJW"; */ +"EYX-qw-RJW.segmentTitles[1]" = "Left"; + +/* Class = "UISegmentedControl"; EYX-qw-RJW.segmentTitles[2] = "Top"; ObjectID = "EYX-qw-RJW"; */ +"EYX-qw-RJW.segmentTitles[2]" = "Top"; + +/* Class = "UISegmentedControl"; EYX-qw-RJW.segmentTitles[3] = "Right"; ObjectID = "EYX-qw-RJW"; */ +"EYX-qw-RJW.segmentTitles[3]" = "Right"; + +/* Class = "UISegmentedControl"; EYX-qw-RJW.segmentTitles[4] = "Bottom"; ObjectID = "EYX-qw-RJW"; */ +"EYX-qw-RJW.segmentTitles[4]" = "Bottom"; + +/* Class = "UIBarButtonItem"; title = "Take snapshot"; ObjectID = "Erp-aX-XoL"; */ +"Erp-aX-XoL.title" = "Take snapshot"; + +/* Class = "UILabel"; text = "Reversed:"; ObjectID = "GRX-8V-bkz"; */ +"GRX-8V-bkz.text" = "Reversed:"; + +/* Class = "UITableViewController"; title = "FlexPie101"; ObjectID = "GYf-gL-MhM"; */ +"GYf-gL-MhM.title" = "FlexPie101"; + +/* Class = "UILabel"; text = "Snapshot"; ObjectID = "HJ7-vQ-Xkx"; */ +"HJ7-vQ-Xkx.text" = "Snapshot"; + +/* Class = "UIBarButtonItem"; title = "Select theme"; ObjectID = "ILU-It-HiN"; */ +"ILU-It-HiN.title" = "Select theme"; + +/* Class = "UINavigationItem"; title = "FlexPie101"; ObjectID = "JGg-u3-6cT"; */ +"JGg-u3-6cT.title" = "FlexPie101"; + +/* Class = "UILabel"; text = "Offset:"; ObjectID = "KID-dH-6qs"; */ +"KID-dH-6qs.text" = "Offset:"; + +/* Class = "UINavigationItem"; title = "Selection"; ObjectID = "KMD-mC-9eY"; */ +"KMD-mC-9eY.title" = "Selection"; + +/* Class = "UINavigationController"; title = "FlexPie101"; ObjectID = "MVE-nJ-8ld"; */ +"MVE-nJ-8ld.title" = "FlexPie101"; + +/* Class = "UILabel"; text = "Shows basic header, footer, and legend positioning"; ObjectID = "Mbx-xV-h8M"; */ +"Mbx-xV-h8M.text" = "Shows basic header, footer, and legend positioning"; + +/* Class = "UILabel"; text = "Shows selection animation, offset, and position"; ObjectID = "Mis-r9-zsr"; */ +"Mis-r9-zsr.text" = "Shows selection animation, offset, and position"; + +/* Class = "UINavigationItem"; title = "Basic Features"; ObjectID = "N7m-He-yJE"; */ +"N7m-He-yJE.title" = "Basic Features"; + +/* Class = "UILabel"; text = "0"; ObjectID = "Ptj-NJ-8Is"; */ +"Ptj-NJ-8Is.text" = "0"; + +/* Class = "UINavigationItem"; title = "Snapshot"; ObjectID = "T09-pu-mNC"; */ +"T09-pu-mNC.title" = "Snapshot"; + +/* Class = "UILabel"; text = "Getting Started"; ObjectID = "Xsl-3n-wli"; */ +"Xsl-3n-wli.text" = "Getting Started"; + +/* Class = "UINavigationItem"; title = "Theming"; ObjectID = "Yxl-Um-f5M"; */ +"Yxl-Um-f5M.title" = "Theming"; + +/* Class = "UILabel"; text = "Animated:"; ObjectID = "aU9-bd-QKe"; */ +"aU9-bd-QKe.text" = "Animated:"; + +/* Class = "UILabel"; text = ">"; ObjectID = "aZK-8n-hQQ"; */ +"aZK-8n-hQQ.text" = ">"; + +/* Class = "UILabel"; text = "Inner radius:"; ObjectID = "aa7-fa-dS8"; */ +"aa7-fa-dS8.text" = "Inner radius:"; + +/* Class = "UILabel"; text = "Basic Features"; ObjectID = "ar7-cq-3jx"; */ +"ar7-cq-3jx.text" = "Basic Features"; + +/* Class = "UILabel"; text = "Shows how to export an image of FlexPie"; ObjectID = "bbC-jR-HrU"; */ +"bbC-jR-HrU.text" = "Shows how to export an image of FlexPie"; + +/* Class = "UILabel"; text = "Start Angle:"; ObjectID = "eYn-3l-CDx"; */ +"eYn-3l-CDx.text" = "Start Angle:"; + +/* Class = "UILabel"; text = ">"; ObjectID = "ec8-fm-Cbr"; */ +"ec8-fm-Cbr.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "fbZ-TF-gFZ"; */ +"fbZ-TF-gFZ.text" = ">"; + +/* Class = "UILabel"; text = "Selected item offset:"; ObjectID = "go0-qT-YIN"; */ +"go0-qT-YIN.text" = "Selected item offset:"; + +/* Class = "UILabel"; text = ">"; ObjectID = "iGn-QC-e2I"; */ +"iGn-QC-e2I.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "icA-SV-8Jm"; */ +"icA-SV-8Jm.text" = ">"; + +/* Class = "UILabel"; text = "Legend And Titles"; ObjectID = "lqF-vC-dJD"; */ +"lqF-vC-dJD.text" = "Legend And Titles"; + +/* Class = "UILabel"; text = "Theming"; ObjectID = "p1E-12-g72"; */ +"p1E-12-g72.text" = "Theming"; + +/* Class = "UILabel"; text = "Shows available palettes"; ObjectID = "sQz-H9-2Wx"; */ +"sQz-H9-2Wx.text" = "Shows available palettes"; + +/* Class = "UILabel"; text = "0"; ObjectID = "uNC-aY-ZRX"; */ +"uNC-aY-ZRX.text" = "0"; + +/* Class = "UINavigationItem"; title = "Legend and Titles"; ObjectID = "vgv-dq-uvm"; */ +"vgv-dq-uvm.title" = "Legend and Titles"; + +/* Class = "UILabel"; text = "Shows a simple pie chart with tooltips"; ObjectID = "wlQ-YC-Ll7"; */ +"wlQ-YC-Ll7.text" = "Shows a simple pie chart with tooltips"; diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie.png b/ObjectiveC/FlexPie101/FlexPie101/pie.png new file mode 100644 index 0000000..5addd54 Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie_doughnut.png b/ObjectiveC/FlexPie101/FlexPie101/pie_doughnut.png new file mode 100644 index 0000000..0de534e Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie_doughnut.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie_labels.png b/ObjectiveC/FlexPie101/FlexPie101/pie_labels.png new file mode 100644 index 0000000..4bfa865 Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie_labels.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie_load.png b/ObjectiveC/FlexPie101/FlexPie101/pie_load.png new file mode 100644 index 0000000..09edd51 Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie_load.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie_selection.png b/ObjectiveC/FlexPie101/FlexPie101/pie_selection.png new file mode 100644 index 0000000..f70be8c Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie_selection.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/pie_title.png b/ObjectiveC/FlexPie101/FlexPie101/pie_title.png new file mode 100644 index 0000000..12777e1 Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/pie_title.png differ diff --git a/ObjectiveC/FlexPie101/FlexPie101/themes.png b/ObjectiveC/FlexPie101/FlexPie101/themes.png new file mode 100644 index 0000000..62fc1fc Binary files /dev/null and b/ObjectiveC/FlexPie101/FlexPie101/themes.png differ diff --git a/ObjectiveC/Gauges101/Gauges101.xcodeproj/project.pbxproj b/ObjectiveC/Gauges101/Gauges101.xcodeproj/project.pbxproj index 4533fc1..42f5e92 100644 --- a/ObjectiveC/Gauges101/Gauges101.xcodeproj/project.pbxproj +++ b/ObjectiveC/Gauges101/Gauges101.xcodeproj/project.pbxproj @@ -7,6 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 4C06B2C31D1F4F4900363CF9 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C11D1F4F4900363CF9 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 4C06B2C41D1F4F4900363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C11D1F4F4900363CF9 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C06B2C51D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C21D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 4C06B2C61D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C21D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C1C57041D26DD39007491EB /* XuniGaugeDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1C57031D26DD39007491EB /* XuniGaugeDesignTimeStoryboardSupport.m */; }; 4C4E83C21C074F3B00EFFC98 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C4E83C41C074F3B00EFFC98 /* Localizable.strings */; }; 4C5FF2981C485551008794F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF29A1C485551008794F4 /* Main.storyboard */; }; 4CBCD9811C42BA92005959E5 /* XGGettingStartedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBCD9801C42BA92005959E5 /* XGGettingStartedViewController.m */; }; @@ -24,8 +29,6 @@ 4CE6A54A1C4830BB0074C229 /* XGAnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A5491C4830BB0074C229 /* XGAnimationViewController.m */; }; 4CE6A54D1C483E0A0074C229 /* XGExportImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE6A54C1C483E0A0074C229 /* XGExportImageViewController.m */; }; F23573601B443ECA00F300D7 /* License.m in Sources */ = {isa = PBXBuildFile; fileRef = F235735F1B443ECA00F300D7 /* License.m */; }; - F23653EF1B0FA0CB008518FE /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F23653EE1B0FA0CB008518FE /* XuniCoreKit.framework */; }; - F23653F11B0FA0D7008518FE /* XuniGaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F23653F01B0FA0D7008518FE /* XuniGaugeKit.framework */; }; F26DAA9A1B0A2011005E5B6D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F26DAA991B0A2011005E5B6D /* main.m */; }; F26DAA9D1B0A2011005E5B6D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F26DAA9C1B0A2011005E5B6D /* AppDelegate.m */; }; F26DAAA51B0A2011005E5B6D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F26DAAA41B0A2011005E5B6D /* Images.xcassets */; }; @@ -43,7 +46,25 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C06B2C71D1F4F4A00363CF9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C06B2C41D1F4F4900363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C06B2C61D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 4C06B2C11D1F4F4900363CF9 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C06B2C21D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeDynamicKit.framework; path = ../../../Controls/XuniGaugeDynamicKit.framework; sourceTree = ""; }; + 4C1C57031D26DD39007491EB /* XuniGaugeDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniGaugeDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniGaugeDesignTimeStoryboardSupport.m; sourceTree = ""; }; 4C4E83B91C0737B800EFFC98 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; 4C4E83C31C074F3B00EFFC98 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; 4C4E83C61C074F4300EFFC98 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; @@ -73,8 +94,6 @@ 4CE6A54C1C483E0A0074C229 /* XGExportImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XGExportImageViewController.m; sourceTree = ""; }; F235735E1B443ECA00F300D7 /* License.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = License.h; sourceTree = ""; }; F235735F1B443ECA00F300D7 /* License.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = License.m; sourceTree = ""; }; - F23653EE1B0FA0CB008518FE /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; - F23653F01B0FA0D7008518FE /* XuniGaugeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeKit.framework; path = "../../../Controls/XuniGaugeKit.framework"; sourceTree = ""; }; F26DAA941B0A2011005E5B6D /* Gauges101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Gauges101.app; sourceTree = BUILT_PRODUCTS_DIR; }; F26DAA981B0A2011005E5B6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F26DAA991B0A2011005E5B6D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -92,8 +111,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F23653EF1B0FA0CB008518FE /* XuniCoreKit.framework in Frameworks */, - F23653F11B0FA0D7008518FE /* XuniGaugeKit.framework in Frameworks */, + 4C06B2C31D1F4F4900363CF9 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C06B2C51D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -123,8 +142,9 @@ F26DAA8B1B0A2011005E5B6D = { isa = PBXGroup; children = ( - F23653F01B0FA0D7008518FE /* XuniGaugeKit.framework */, - F23653EE1B0FA0CB008518FE /* XuniCoreKit.framework */, + 4C1C57031D26DD39007491EB /* XuniGaugeDesignTimeStoryboardSupport.m */, + 4C06B2C11D1F4F4900363CF9 /* XuniCoreDynamicKit.framework */, + 4C06B2C21D1F4F4900363CF9 /* XuniGaugeDynamicKit.framework */, F26DAA961B0A2011005E5B6D /* Gauges101 */, F26DAAB01B0A2011005E5B6D /* Gauges101Tests */, F26DAA951B0A2011005E5B6D /* Products */, @@ -211,6 +231,7 @@ F26DAA901B0A2011005E5B6D /* Sources */, F26DAA911B0A2011005E5B6D /* Frameworks */, F26DAA921B0A2011005E5B6D /* Resources */, + 4C06B2C71D1F4F4A00363CF9 /* Embed Frameworks */, ); buildRules = ( ); @@ -310,6 +331,7 @@ buildActionMask = 2147483647; files = ( 4CE6A54A1C4830BB0074C229 /* XGAnimationViewController.m in Sources */, + 4C1C57041D26DD39007491EB /* XuniGaugeDesignTimeStoryboardSupport.m in Sources */, F26DAA9D1B0A2011005E5B6D /* AppDelegate.m in Sources */, 4CE6A5471C480D380074C229 /* XGBulletGraphViewController.m in Sources */, F23573601B443ECA00F300D7 /* License.m in Sources */, diff --git a/ObjectiveC/Gauges101/Gauges101/AppDelegate.m b/ObjectiveC/Gauges101/Gauges101/AppDelegate.m index 015b1dc..b28c71c 100644 --- a/ObjectiveC/Gauges101/Gauges101/AppDelegate.m +++ b/ObjectiveC/Gauges101/Gauges101/AppDelegate.m @@ -5,9 +5,10 @@ // Copyright (c) 2015 GrapeCity. All rights reserved. // +@import XuniCoreDynamicKit; +@import XuniGaugeDynamicKit; + #import "AppDelegate.h" -#import "XuniCoreKit/XuniCoreKit.h" -#import #import "License.h" @interface AppDelegate () diff --git a/ObjectiveC/Gauges101/Gauges101/Base.lproj/Main.storyboard b/ObjectiveC/Gauges101/Gauges101/Base.lproj/Main.storyboard index 097c7ac..916c05a 100644 --- a/ObjectiveC/Gauges101/Gauges101/Base.lproj/Main.storyboard +++ b/ObjectiveC/Gauges101/Gauges101/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -39,7 +39,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -538,10 +538,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -616,10 +645,22 @@ - + + + + + + + + + + + + + @@ -642,10 +683,31 @@ - + + + + + + + + + + + + + + + + + + + + + + - + @@ -680,7 +742,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -693,7 +773,7 @@ - + @@ -836,14 +916,100 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -961,7 +1127,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1029,11 +1240,53 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1042,11 +1295,62 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1132,14 +1436,78 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1222,6 +1590,23 @@ + + + + + + + + + + + + + + + + + @@ -1272,16 +1657,93 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ObjectiveC/Gauges101/Gauges101/XGAnimationViewController.m b/ObjectiveC/Gauges101/Gauges101/XGAnimationViewController.m index 2327900..2fd11d7 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGAnimationViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGAnimationViewController.m @@ -6,7 +6,7 @@ // #import "XGAnimationViewController.h" -#import +@import XuniGaugeDynamicKit; @interface XGAnimationViewController () @property (weak, nonatomic) IBOutlet XuniLinearGauge *linearGauge; @@ -19,37 +19,15 @@ @implementation XGAnimationViewController - (void)viewDidLoad { [super viewDidLoad]; - _radialGauge.thickness = 0.6; - _radialGauge.min = 0; - _radialGauge.max = 100; - _radialGauge.value = 25; _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 2.5; - _radialGauge.isReadOnly = true; - _linearGauge.min = 0; - _linearGauge.max = 100; - _linearGauge.value = 25; _linearGauge.loadAnimation.duration = 2; _linearGauge.updateAnimation.duration = 2.5; - _linearGauge.isReadOnly = true; - _linearGauge.backgroundColor = [UIColor clearColor]; - _radialGauge.backgroundColor = _linearGauge.backgroundColor = [UIColor clearColor]; - _radialGauge.pointerColor = _linearGauge.pointerColor = [UIColor whiteColor]; - _radialGauge.faceBorderWidth = _linearGauge.faceBorderWidth = 1; - _radialGauge.faceBorderColor = _linearGauge.faceBorderColor = [UIColor whiteColor]; - _radialGauge.faceColor = _linearGauge.faceColor = [UIColor clearColor]; - _radialGauge.valueFontColor = [UIColor whiteColor]; - _linearGauge.valueFontColor = [UIColor blueColor]; - _radialGauge.minFontColor = _linearGauge.minFontColor = [UIColor whiteColor]; - _radialGauge.maxFontColor = _linearGauge.maxFontColor = [UIColor whiteColor]; - _radialGauge.valueFont = _linearGauge.valueFont = [UIFont fontWithName:@"Optima" size:19]; - - // Create ranges. XuniGaugeRange* lower = [[XuniGaugeRange alloc] initWithGauge:_linearGauge]; lower.min = 0; diff --git a/ObjectiveC/Gauges101/Gauges101/XGAutomaticScalingViewController.m b/ObjectiveC/Gauges101/Gauges101/XGAutomaticScalingViewController.m index 202fee7..4dd0dd8 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGAutomaticScalingViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGAutomaticScalingViewController.m @@ -6,7 +6,7 @@ // #import "XGAutomaticScalingViewController.h" -#import +@import XuniGaugeDynamicKit; @interface XGAutomaticScalingViewController () @property (weak, nonatomic) IBOutlet UIStepper *startAngleStepper; @@ -30,25 +30,9 @@ - (IBAction)angleChanged:(id)sender { - (void)viewDidLoad { [super viewDidLoad]; - _radialGauge.thickness = 0.6; - _radialGauge.min = 0; - _radialGauge.max = 200; - _radialGauge.value = 25; + _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 3.5; - _radialGauge.isReadOnly = true; - _radialGauge.startAngle = 90; - _radialGauge.sweepAngle = 90; - - _radialGauge.backgroundColor = [UIColor clearColor]; - _radialGauge.pointerColor = [UIColor whiteColor]; - _radialGauge.faceBorderWidth = 1; - _radialGauge.faceBorderColor = [UIColor whiteColor]; - _radialGauge.faceColor = [UIColor clearColor]; - _radialGauge.valueFontColor = [UIColor whiteColor]; - _radialGauge.minFontColor = [UIColor whiteColor]; - _radialGauge.maxFontColor = [UIColor whiteColor]; - _radialGauge.valueFont = [UIFont fontWithName:@"Optima" size:19]; [self angleChanged:nil]; diff --git a/ObjectiveC/Gauges101/Gauges101/XGBulletGraphViewController.m b/ObjectiveC/Gauges101/Gauges101/XGBulletGraphViewController.m index 94595e9..a64b37c 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGBulletGraphViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGBulletGraphViewController.m @@ -5,8 +5,10 @@ // Copyright © 2016 GrapeCity. All rights reserved. // +@import XuniGaugeDynamicKit; + #import "XGBulletGraphViewController.h" -#import + @interface XGBulletGraphViewController () @property (weak, nonatomic) IBOutlet UILabel *badDisplay; @@ -37,19 +39,9 @@ - (void)viewDidLoad { [super viewDidLoad]; - _bulletGraph.showText = XuniShowTextNone; - _bulletGraph.min = 0; - _bulletGraph.max = 100; - _bulletGraph.value = 30; _bulletGraph.loadAnimation.duration = 2; _bulletGraph.updateAnimation.duration = 0.5; - _bulletGraph.isReadOnly = false; - _bulletGraph.bad = 45; - _bulletGraph.good = 80; - _bulletGraph.target = 90; - - _bulletGraph.pointer.thickness = 0.33; - _bulletGraph.pointerColor = [UIColor blackColor]; + [self stepperChanged:nil]; } diff --git a/ObjectiveC/Gauges101/Gauges101/XGDirectionViewController.m b/ObjectiveC/Gauges101/Gauges101/XGDirectionViewController.m index eadf2ce..a1cc42c 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGDirectionViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGDirectionViewController.m @@ -5,7 +5,7 @@ // Copyright © 2016 GrapeCity. All rights reserved. // -#import +@import XuniGaugeDynamicKit; #import "XGDirectionViewController.h" @interface XGDirectionViewController () @@ -101,37 +101,11 @@ - (void)viewDidLoad { [super viewDidLoad]; _linearGauge.isReadOnly = _bulletGraph.isReadOnly = false; - - _linearGauge.backgroundColor = _bulletGraph.backgroundColor = [UIColor clearColor]; - - _linearGauge.showText = _bulletGraph.showText = XuniShowTextAll; - - _bulletGraph.backgroundColor = _linearGauge.backgroundColor = [UIColor clearColor]; - _bulletGraph.pointerColor = _linearGauge.pointerColor = [UIColor whiteColor]; - _bulletGraph.faceBorderWidth = _linearGauge.faceBorderWidth = 1; - _bulletGraph.faceBorderColor = _linearGauge.faceBorderColor = [UIColor whiteColor]; - _linearGauge.faceColor = [UIColor clearColor]; - _bulletGraph.faceColor = [UIColor whiteColor]; - _bulletGraph.valueFontColor = _linearGauge.valueFontColor = [UIColor blueColor]; - _bulletGraph.minFontColor = _linearGauge.minFontColor = [UIColor whiteColor]; - _bulletGraph.maxFontColor = _linearGauge.maxFontColor = [UIColor whiteColor]; - _bulletGraph.valueFont = _linearGauge.valueFont = [UIFont fontWithName:@"Optima" size:19]; - - _bulletGraph.thickness = 0.6; - _bulletGraph.min = 0; - _bulletGraph.max = 100; - _bulletGraph.bad = 45; - _bulletGraph.good = 80; - _bulletGraph.target = 90; - _bulletGraph.value = 80; + _bulletGraph.pointer.thickness = 0.5; _bulletGraph.loadAnimation.duration = 2; _bulletGraph.updateAnimation.duration = 0.5; - _linearGauge.thickness = 0.6; - _linearGauge.min = 0; - _linearGauge.max = 100; - _linearGauge.value = 80; _linearGauge.loadAnimation.duration = 2; _linearGauge.updateAnimation.duration = 0.5; diff --git a/ObjectiveC/Gauges101/Gauges101/XGDisplayingValuesViewController.m b/ObjectiveC/Gauges101/Gauges101/XGDisplayingValuesViewController.m index fd69ae8..97442ae 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGDisplayingValuesViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGDisplayingValuesViewController.m @@ -6,7 +6,7 @@ // #import "XGDisplayingValuesViewController.h" -#import "XuniGaugeKit/XuniGaugeKit.h" +@import XuniGaugeDynamicKit; @interface XGDisplayingValuesViewController () @property (weak, nonatomic) IBOutlet UILabel *valueDisplay; @@ -55,49 +55,26 @@ - (void)viewDidLoad { [self modeSelected:nil]; - _radialGauge.thickness = 0.6; - _radialGauge.min = _valueStepper.minimumValue; - _radialGauge.max = _valueStepper.maximumValue; - _radialGauge.value = _valueStepper.value; _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 0.5; - _radialGauge.isReadOnly = false; - _radialGauge.startAngle = 90; - _radialGauge.sweepAngle = 90; - [_radialGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + [_radialGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _radialGauge.value; [self stepperValueChanged:nil]; } forObject:self]; - _linearGauge.min = _valueStepper.minimumValue; - _linearGauge.max = _valueStepper.maximumValue; - _linearGauge.value = _valueStepper.value; _linearGauge.loadAnimation.duration = 2; _linearGauge.updateAnimation.duration = 0.5; - _linearGauge.isReadOnly = false; - _linearGauge.backgroundColor = [UIColor clearColor]; - [_linearGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + + [_linearGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _linearGauge.value; [self stepperValueChanged:nil]; } forObject:self]; - - - _radialGauge.backgroundColor = _linearGauge.backgroundColor = [UIColor clearColor]; - _radialGauge.pointerColor = _linearGauge.pointerColor = [UIColor whiteColor]; - _radialGauge.faceBorderWidth = _linearGauge.faceBorderWidth = 1; - _radialGauge.faceBorderColor = _linearGauge.faceBorderColor = [UIColor whiteColor]; - _radialGauge.faceColor = _linearGauge.faceColor = [UIColor clearColor]; - _radialGauge.valueFontColor = [UIColor whiteColor]; - _linearGauge.valueFontColor = [UIColor blueColor]; - _radialGauge.minFontColor = _linearGauge.minFontColor = [UIColor whiteColor]; - _radialGauge.maxFontColor = _linearGauge.maxFontColor = [UIColor whiteColor]; - _radialGauge.valueFont = _linearGauge.valueFont = [UIFont fontWithName:@"Optima" size:19]; } diff --git a/ObjectiveC/Gauges101/Gauges101/XGExportImageViewController.m b/ObjectiveC/Gauges101/Gauges101/XGExportImageViewController.m index ab3c5ef..5f64df5 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGExportImageViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGExportImageViewController.m @@ -6,7 +6,7 @@ // #import "XGExportImageViewController.h" -#import +@import XuniGaugeDynamicKit; #define LOC(A) NSLocalizedString(A, nil) @@ -20,17 +20,9 @@ @implementation XGExportImageViewController - (void)viewDidLoad { [super viewDidLoad]; - - - _radialGauge.showText = XuniShowTextNone; - _radialGauge.thickness = 0.6; - _radialGauge.min = 0; - _radialGauge.max = 100; - _radialGauge.value = 25; + _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 2.5; - _radialGauge.isReadOnly = true; - _radialGauge.showText = XuniShowTextAll; [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(animateNextStep:) userInfo:nil repeats:true]; @@ -72,6 +64,8 @@ -(void)imageSavedToPhotoAlbum:(UIImage *)image finishedSavingWithError: (NSError } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:LOC(@"OK") otherButtonTitles:nil]; [alert show]; + _radialGauge.hidden = false; + _snapshotDisplay.hidden = true; } - (IBAction)takeSnapshot:(id)sender { diff --git a/ObjectiveC/Gauges101/Gauges101/XGGettingStartedViewController.m b/ObjectiveC/Gauges101/Gauges101/XGGettingStartedViewController.m index 6422c2f..598c1c5 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGGettingStartedViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGGettingStartedViewController.m @@ -6,7 +6,8 @@ // #import "XGGettingStartedViewController.h" -#import "XuniGaugeKit/XuniGaugeKit.h" + +@import XuniGaugeDynamicKit; @interface XGGettingStartedViewController () @property (weak, nonatomic) IBOutlet XuniRadialGauge *radialGauge; @@ -32,50 +33,32 @@ - (void)viewDidLoad { _valueDisplay.text = [NSString stringWithFormat:@"%i", (int)_valueStepper.value]; - _radialGauge.showText = XuniShowTextNone; - _radialGauge.thickness = 0.6; - _radialGauge.min = _valueStepper.minimumValue; - _radialGauge.max = _valueStepper.maximumValue; - _radialGauge.value = _valueStepper.value; _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 0.5; - _radialGauge.isReadOnly = false; - _radialGauge.showText = XuniShowTextNone; + [_radialGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { + _valueStepper.value = _radialGauge.value; + [self stepperValueChanged:nil]; + } forObject:self]; - [_radialGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) - { - _valueStepper.value = _radialGauge.value; - [self stepperValueChanged:nil]; - } - forObject:self]; - _linearGauge.showText = XuniShowTextNone; - _linearGauge.min = _valueStepper.minimumValue; - _linearGauge.max = _valueStepper.maximumValue; - _linearGauge.value = _valueStepper.value; _linearGauge.loadAnimation.duration = 2; _linearGauge.updateAnimation.duration = 0.5; - _linearGauge.isReadOnly = false; - [_linearGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + + + [_linearGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _linearGauge.value; [self stepperValueChanged:nil]; } forObject:self]; - _bulletGraph.showText = XuniShowTextNone; - _bulletGraph.min = _valueStepper.minimumValue; - _bulletGraph.max = _valueStepper.maximumValue; - _bulletGraph.value = _valueStepper.value; + _bulletGraph.loadAnimation.duration = 2; _bulletGraph.updateAnimation.duration = 0.5; - _bulletGraph.isReadOnly = false; - _bulletGraph.bad = 45; - _bulletGraph.good = 80; - _bulletGraph.target = 90; - [_bulletGraph.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + + [_bulletGraph.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _bulletGraph.value; [self stepperValueChanged:nil]; diff --git a/ObjectiveC/Gauges101/Gauges101/XGUsingRangesViewController.m b/ObjectiveC/Gauges101/Gauges101/XGUsingRangesViewController.m index 9930b31..613c4ad 100644 --- a/ObjectiveC/Gauges101/Gauges101/XGUsingRangesViewController.m +++ b/ObjectiveC/Gauges101/Gauges101/XGUsingRangesViewController.m @@ -6,7 +6,7 @@ // #import "XGUsingRangesViewController.h" -#import +@import XuniGaugeDynamicKit; @interface XGUsingRangesViewController () @property (weak, nonatomic) IBOutlet UIStepper *valueStepper; @@ -43,30 +43,22 @@ - (void)viewDidLoad { _valueDisplay.text = [NSString stringWithFormat:@"%i", (int)_valueStepper.value]; - _radialGauge.thickness = 0.6; - _radialGauge.min = _valueStepper.minimumValue; - _radialGauge.max = _valueStepper.maximumValue; - _radialGauge.value = _valueStepper.value; _radialGauge.loadAnimation.duration = 2; _radialGauge.updateAnimation.duration = 0.5; - _radialGauge.isReadOnly = false; - [_radialGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + [_radialGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _radialGauge.value; [self stepperValueChanged:nil]; } forObject:self]; - _linearGauge.min = _valueStepper.minimumValue; - _linearGauge.max = _valueStepper.maximumValue; - _linearGauge.value = _valueStepper.value; + _linearGauge.loadAnimation.duration = 2; _linearGauge.updateAnimation.duration = 0.5; - _linearGauge.isReadOnly = false; - _linearGauge.backgroundColor = [UIColor clearColor]; - [_linearGauge.gaugeValueChanged addHandler:^(NSObject* sender, XuniEventArgs* args) + + [_linearGauge.gaugeValueChanged addHandler:^(XuniEventContainer *eventContainer) { _valueStepper.value = _linearGauge.value; [self stepperValueChanged:nil]; @@ -74,18 +66,6 @@ - (void)viewDidLoad { forObject:self]; - _radialGauge.backgroundColor = _linearGauge.backgroundColor = [UIColor clearColor]; - _radialGauge.pointerColor = _linearGauge.pointerColor = [UIColor whiteColor]; - _radialGauge.faceBorderWidth = _linearGauge.faceBorderWidth = 1; - _radialGauge.faceBorderColor = _linearGauge.faceBorderColor = [UIColor whiteColor]; - _radialGauge.faceColor = _linearGauge.faceColor = [UIColor clearColor]; - _radialGauge.valueFontColor = [UIColor whiteColor]; - _linearGauge.valueFontColor = [UIColor blueColor]; - _radialGauge.minFontColor = _linearGauge.minFontColor = [UIColor whiteColor]; - _radialGauge.maxFontColor = _linearGauge.maxFontColor = [UIColor whiteColor]; - _radialGauge.valueFont = _linearGauge.valueFont = [UIFont fontWithName:@"Optima" size:19]; - - // Create ranges. XuniGaugeRange* lower = [[XuniGaugeRange alloc] initWithGauge:_linearGauge]; lower.min = 0; @@ -105,6 +85,7 @@ - (void)viewDidLoad { upper.color = [UIColor colorWithRed:0 green:0.635 blue:0.91 alpha:1]; upper.borderColor = [UIColor whiteColor]; upper.borderWidth = 1; + // Add ranges. [_linearGauge.ranges addObject:lower]; [_linearGauge.ranges addObject:middle]; @@ -118,19 +99,5 @@ - (void)viewDidLoad { [self rangesValueChanged:nil]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ @end diff --git a/ObjectiveC/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings b/ObjectiveC/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings index ea141d8..3687668 100644 --- a/ObjectiveC/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings +++ b/ObjectiveC/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ /* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +"8ie-xW-0ye.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; /* Class = "UILabel"; text = "Gauges101"; ObjectID = "kId-c2-rCX"; */ "kId-c2-rCX.text" = "Gauges101"; diff --git a/ObjectiveC/Gauges101/Gauges101/ja.lproj/Main.strings b/ObjectiveC/Gauges101/Gauges101/ja.lproj/Main.strings index 1ccab45..9dd8bcd 100644 --- a/ObjectiveC/Gauges101/Gauges101/ja.lproj/Main.strings +++ b/ObjectiveC/Gauges101/Gauges101/ja.lproj/Main.strings @@ -1,18 +1,18 @@ - + /* Class = "UIViewController"; title = "Displaying Values"; ObjectID = "08v-Js-otx"; */ -"08v-Js-otx.title" = "Displaying Values"; +"08v-Js-otx.title" = "値の表示"; /* Class = "UILabel"; text = "Getting Started"; ObjectID = "1ee-Cf-CWG"; */ -"1ee-Cf-CWG.text" = "Getting Started"; +"1ee-Cf-CWG.text" = "Gaugeの基本機能"; /* Class = "UILabel"; text = "Target:"; ObjectID = "3ED-w9-Ppg"; */ -"3ED-w9-Ppg.text" = "Target:"; +"3ED-w9-Ppg.text" = "目標値:"; /* Class = "UILabel"; text = "Using Ranges"; ObjectID = "7J6-GK-aNv"; */ -"7J6-GK-aNv.text" = "Using Ranges"; +"7J6-GK-aNv.text" = "範囲の使用"; /* Class = "UIViewController"; title = "Direction"; ObjectID = "8HJ-fh-1SY"; */ -"8HJ-fh-1SY.title" = "Direction"; +"8HJ-fh-1SY.title" = "ポインタの方向"; /* Class = "UINavigationItem"; title = "Gauges101"; ObjectID = "8Wf-a8-DaP"; */ "8Wf-a8-DaP.title" = "Gauges101"; @@ -21,25 +21,25 @@ "90n-xp-2bQ.text" = ">"; /* Class = "UIViewController"; title = "Using Ranges"; ObjectID = "97A-vA-PeO"; */ -"97A-vA-PeO.title" = "Using Ranges"; +"97A-vA-PeO.title" = "範囲の使用"; /* Class = "UILabel"; text = "Automatic Scaling"; ObjectID = "9Cb-yd-23P"; */ -"9Cb-yd-23P.text" = "Automatic Scaling"; +"9Cb-yd-23P.text" = "自動スケーリング"; /* Class = "UILabel"; text = ">"; ObjectID = "9NI-Dt-7eP"; */ "9NI-Dt-7eP.text" = ">"; /* Class = "UILabel"; text = "BulletGraph"; ObjectID = "9el-8a-fhh"; */ -"9el-8a-fhh.text" = "BulletGraph"; +"9el-8a-fhh.text" = "ブレットグラフ"; /* Class = "UITableViewController"; title = "Gauges101"; ObjectID = "AU1-cr-RgQ"; */ "AU1-cr-RgQ.title" = "Gauges101"; /* Class = "UILabel"; text = "Shows custom animation techniques"; ObjectID = "Alq-na-nFv"; */ -"Alq-na-nFv.text" = "Shows custom animation techniques"; +"Alq-na-nFv.text" = "カスタマイズしたアニメーション効果"; /* Class = "UIBarButtonItem"; title = "Save"; ObjectID = "FBK-za-8GA"; */ -"FBK-za-8GA.title" = "Save"; +"FBK-za-8GA.title" = "保存"; /* Class = "UILabel"; text = "25"; ObjectID = "FxO-w8-ck0"; */ "FxO-w8-ck0.text" = "25"; @@ -51,10 +51,10 @@ "HBI-Dp-7R8.text" = "25"; /* Class = "UIViewController"; title = "Getting Started"; ObjectID = "K37-G5-oNb"; */ -"K37-G5-oNb.title" = "Getting Started"; +"K37-G5-oNb.title" = "Gaugeの基本機能"; /* Class = "UILabel"; text = "Value:"; ObjectID = "L1J-cb-T1O"; */ -"L1J-cb-T1O.text" = "Value:"; +"L1J-cb-T1O.text" = "値:"; /* Class = "UILabel"; text = "25"; ObjectID = "MY9-fZ-afe"; */ "MY9-fZ-afe.text" = "25"; @@ -63,70 +63,70 @@ "OGj-UI-bB3.text" = "25"; /* Class = "UILabel"; text = "Bad:"; ObjectID = "Pub-T4-qcT"; */ -"Pub-T4-qcT.text" = "Bad:"; +"Pub-T4-qcT.text" = "不良値:"; /* Class = "UILabel"; text = "Direction"; ObjectID = "SAF-Yp-pdT"; */ -"SAF-Yp-pdT.text" = "Direction"; +"SAF-Yp-pdT.text" = "ポインタの方向"; /* Class = "UINavigationItem"; title = "Export Image"; ObjectID = "SNe-ez-n5s"; */ -"SNe-ez-n5s.title" = "Export Image"; +"SNe-ez-n5s.title" = "画像のエクスポート"; /* Class = "UIBarButtonItem"; title = "Take"; ObjectID = "SfY-tf-4K4"; */ -"SfY-tf-4K4.title" = "Take"; +"SfY-tf-4K4.title" = "画像を取得"; /* Class = "UILabel"; text = "25"; ObjectID = "V8W-Od-sjy"; */ "V8W-Od-sjy.text" = "25"; /* Class = "UILabel"; text = "Shows a radial gauge with different sweep angles"; ObjectID = "Van-sG-8er"; */ -"Van-sG-8er.text" = "Shows a radial gauge with different sweep angles"; +"Van-sG-8er.text" = "角度が異なる円形ゲージを表示"; /* Class = "UIViewController"; title = "Export Image"; ObjectID = "WDz-EX-ieM"; */ -"WDz-EX-ieM.title" = "Export Image"; +"WDz-EX-ieM.title" = "画像へのエクスポート"; /* Class = "UILabel"; text = "Displaying Values"; ObjectID = "Wge-Jg-8BX"; */ -"Wge-Jg-8BX.text" = "Displaying Values"; +"Wge-Jg-8BX.text" = "値ラベルの表示"; /* Class = "UILabel"; text = "Export Image"; ObjectID = "XMx-92-4cz"; */ -"XMx-92-4cz.text" = "Export Image"; +"XMx-92-4cz.text" = "画像へのエクスポート"; /* Class = "UILabel"; text = "Bullet Graph"; ObjectID = "XNt-pY-JQX"; */ -"XNt-pY-JQX.text" = "Bullet Graph"; +"XNt-pY-JQX.text" = "ブレットグラフ"; /* Class = "UILabel"; text = "Shows how to export an image of a gauge"; ObjectID = "XWe-Ze-WII"; */ -"XWe-Ze-WII.text" = "Shows how to export an image of a gauge"; +"XWe-Ze-WII.text" = "ゲージを画像として表示する方法"; /* Class = "UILabel"; text = "Animation"; ObjectID = "Xl9-rg-7Sy"; */ -"Xl9-rg-7Sy.text" = "Animation"; +"Xl9-rg-7Sy.text" = "アニメーション"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[0] = "Right"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[0]" = "Right"; +"YMs-gj-yEm.segmentTitles[0]" = "右(Right)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[1] = "Left"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[1]" = "Left"; +"YMs-gj-yEm.segmentTitles[1]" = "左(Left)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[2] = "Down"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[2]" = "Down"; +"YMs-gj-yEm.segmentTitles[2]" = "下(Down)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[3] = "Up"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[3]" = "Up"; +"YMs-gj-yEm.segmentTitles[3]" = "上(Up)"; /* Class = "UILabel"; text = "Radial Gauge:"; ObjectID = "aG3-kp-5yy"; */ -"aG3-kp-5yy.text" = "Radial Gauge:"; +"aG3-kp-5yy.text" = "円形ゲージ"; /* Class = "UILabel"; text = ">"; ObjectID = "bGa-Ca-sVM"; */ "bGa-Ca-sVM.text" = ">"; /* Class = "UILabel"; text = "Linear Gauge"; ObjectID = "bSF-Vv-iOI"; */ -"bSF-Vv-iOI.text" = "Linear Gauge"; +"bSF-Vv-iOI.text" = "線形ゲージ"; /* Class = "UILabel"; text = "Direction:"; ObjectID = "dkS-jp-MbA"; */ -"dkS-jp-MbA.text" = "Direction:"; +"dkS-jp-MbA.text" = "方向:"; /* Class = "UILabel"; text = "Shows customized ranges behind the pointer"; ObjectID = "eFO-oh-g7u"; */ -"eFO-oh-g7u.text" = "Shows customized ranges behind the pointer"; +"eFO-oh-g7u.text" = "範囲の設定領域をポインタの背後に表示"; /* Class = "UILabel"; text = "Good:"; ObjectID = "fKb-LG-Ipi"; */ -"fKb-LG-Ipi.text" = "Good:"; +"fKb-LG-Ipi.text" = "良 値:"; /* Class = "UILabel"; text = "25"; ObjectID = "fXK-Pj-z2I"; */ "fXK-Pj-z2I.text" = "25"; @@ -135,7 +135,7 @@ "gM7-nb-edl.text" = "25"; /* Class = "UILabel"; text = "Shows a bulletgraph with good, bad and target ranges"; ObjectID = "i1t-bi-tIj"; */ -"i1t-bi-tIj.text" = "Shows a bulletgraph with good, bad and target ranges"; +"i1t-bi-tIj.text" = "「良値/不良値/目標値」の範囲を設定して表示"; /* Class = "UILabel"; text = ">"; ObjectID = "ip3-22-hTU"; */ "ip3-22-hTU.text" = ">"; @@ -144,40 +144,40 @@ "jKi-Lt-4No.title" = "Gauges101"; /* Class = "UILabel"; text = "Show ranges:"; ObjectID = "kWE-Ws-VUg"; */ -"kWE-Ws-VUg.text" = "Show ranges:"; +"kWE-Ws-VUg.text" = "範囲の表示:"; /* Class = "UIViewController"; title = "Automatic Scaling"; ObjectID = "lsw-OR-pPQ"; */ -"lsw-OR-pPQ.title" = "Automatic Scaling"; +"lsw-OR-pPQ.title" = "自動スケーリング"; /* Class = "UILabel"; text = "Sweep Angle:"; ObjectID = "ox7-O5-nN1"; */ -"ox7-O5-nN1.text" = "Sweep Angle:"; +"ox7-O5-nN1.text" = "移動角度:"; /* Class = "UILabel"; text = "Shows linear gauges at different directions"; ObjectID = "qT9-gI-3dF"; */ -"qT9-gI-3dF.text" = "Shows linear gauges at different directions"; +"qT9-gI-3dF.text" = "方向が異なる線形ゲージを表示"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[0] = "All"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[0]" = "All"; +"qsf-cb-II0.segmentTitles[0]" = "すべて表示"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[1] = "MinMax"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[1]" = "MinMax"; +"qsf-cb-II0.segmentTitles[1]" = "最小値と最大値"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[2] = "Value"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[2]" = "Value"; +"qsf-cb-II0.segmentTitles[2]" = "現在の値"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[3] = "None"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[3]" = "None"; +"qsf-cb-II0.segmentTitles[3]" = "表示なし"; /* Class = "UIViewController"; title = "BulletGraph"; ObjectID = "qxu-TE-WXN"; */ -"qxu-TE-WXN.title" = "BulletGraph"; +"qxu-TE-WXN.title" = "ブレットグラフ"; /* Class = "UILabel"; text = ">"; ObjectID = "rSe-fm-Gxe"; */ "rSe-fm-Gxe.text" = ">"; /* Class = "UILabel"; text = "Value:"; ObjectID = "rZc-UW-ghl"; */ -"rZc-UW-ghl.text" = "Value:"; +"rZc-UW-ghl.text" = "現在の値:"; /* Class = "UILabel"; text = "Start Angle:"; ObjectID = "t1k-Of-tJc"; */ -"t1k-Of-tJc.text" = "Start Angle:"; +"t1k-Of-tJc.text" = "開始角度:"; /* Class = "UILabel"; text = ">"; ObjectID = "uWs-YC-BOy"; */ "uWs-YC-BOy.text" = ">"; @@ -186,16 +186,16 @@ "v4P-ZC-9ef.text" = ">"; /* Class = "UIViewController"; title = "Animation"; ObjectID = "yDK-XO-7Ae"; */ -"yDK-XO-7Ae.title" = "Animation"; +"yDK-XO-7Ae.title" = "アニメーション"; /* Class = "UILabel"; text = "Shows simple gauge controls with interaction"; ObjectID = "yEl-vp-kjt"; */ -"yEl-vp-kjt.text" = "Shows simple gauge controls with interaction"; +"yEl-vp-kjt.text" = "インタラクション機能を持つゲージ"; /* Class = "UILabel"; text = "Shows value labels on the gauges"; ObjectID = "yWQ-mg-ImF"; */ -"yWQ-mg-ImF.text" = "Shows value labels on the gauges"; +"yWQ-mg-ImF.text" = "値ラベルをゲージに表示"; /* Class = "UILabel"; text = "Value:"; ObjectID = "z2t-xN-ZFN"; */ -"z2t-xN-ZFN.text" = "Value:"; +"z2t-xN-ZFN.text" = "現在の値:"; /* Class = "UILabel"; text = ">"; ObjectID = "zUw-ej-Vj6"; */ "zUw-ej-Vj6.text" = ">"; diff --git a/ObjectiveC/Gauges101/ja.lproj/Localizable.strings b/ObjectiveC/Gauges101/ja.lproj/Localizable.strings index e5fe2c0..49dba9d 100644 --- a/ObjectiveC/Gauges101/ja.lproj/Localizable.strings +++ b/ObjectiveC/Gauges101/ja.lproj/Localizable.strings @@ -39,4 +39,6 @@ "Success" = "成功"; "Failure" = "失敗"; "Image was saved to Camera Roll succesfully" = "画像はカメラロールに正常に保存されました。"; -"OK" = "OK"; \ No newline at end of file +"OK" = "OK"; +"Warning" = "注意"; +"You should take the snapshot before saving it to Camera Roll" = "カメラロールに保存する前に、画像を取得する必要があります"; \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101.xcodeproj/project.pbxproj b/ObjectiveC/Input101/Input101.xcodeproj/project.pbxproj new file mode 100644 index 0000000..615e60a --- /dev/null +++ b/ObjectiveC/Input101/Input101.xcodeproj/project.pbxproj @@ -0,0 +1,422 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4C03A2081D257DF50002EB08 /* XuniInputDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A768F1D257CB90020670C /* XuniInputDynamicKit.framework */; }; + 4C03A2091D257DF50002EB08 /* XuniInputDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A768F1D257CB90020670C /* XuniInputDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C03A20A1D257DF50002EB08 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A76901D257CB90020670C /* XuniCoreDynamicKit.framework */; }; + 4C03A20B1D257DF50002EB08 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A76901D257CB90020670C /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C03A2641D2581E70002EB08 /* XuniCalendarDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C03A2631D2581E70002EB08 /* XuniCalendarDynamicKit.framework */; }; + 4C03A2651D2581EA0002EB08 /* XuniCalendarDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C03A2631D2581E70002EB08 /* XuniCalendarDynamicKit.framework */; }; + 4C03A2661D2581EA0002EB08 /* XuniCalendarDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C03A2631D2581E70002EB08 /* XuniCalendarDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C0A76911D257CB90020670C /* XuniInputDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A768F1D257CB90020670C /* XuniInputDynamicKit.framework */; }; + 4C0A76921D257CB90020670C /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C0A76901D257CB90020670C /* XuniCoreDynamicKit.framework */; }; + 4C393DD61D266C230053B783 /* XuniCoreDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD41D266C230053B783 /* XuniCoreDesignTimeStoryboardSupport.m */; }; + 4C393DD71D266C230053B783 /* XuniInputDesignTimeStoryboardSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD51D266C230053B783 /* XuniInputDesignTimeStoryboardSupport.m */; }; + 844FD0DF1CED8F6E0011DEA1 /* ComboBoxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 844FD0DE1CED8F6E0011DEA1 /* ComboBoxController.m */; }; + 84837B031CE574FC0008468B /* License.m in Sources */ = {isa = PBXBuildFile; fileRef = 84837B021CE574FC0008468B /* License.m */; }; + 84BD21811D13E35900CCE1BF /* input_autocomplete.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD217D1D13E35900CCE1BF /* input_autocomplete.png */; }; + 84BD21821D13E35900CCE1BF /* input_combobox.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD217E1D13E35900CCE1BF /* input_combobox.png */; }; + 84BD21831D13E35900CCE1BF /* input_dropdown.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD217F1D13E35900CCE1BF /* input_dropdown.png */; }; + 84BD21841D13E35900CCE1BF /* input_mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD21801D13E35900CCE1BF /* input_mask.png */; }; + 84D383511CD8431C004C1DBF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D383501CD8431C004C1DBF /* main.m */; }; + 84D383541CD8431C004C1DBF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D383531CD8431C004C1DBF /* AppDelegate.m */; }; + 84D3835A1CD8431C004C1DBF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84D383581CD8431C004C1DBF /* Main.storyboard */; }; + 84D3835C1CD8431C004C1DBF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84D3835B1CD8431C004C1DBF /* Assets.xcassets */; }; + 84D3835F1CD8431C004C1DBF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84D3835D1CD8431C004C1DBF /* LaunchScreen.storyboard */; }; + 84D383731CD87859004C1DBF /* MaskedInputController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D383721CD87859004C1DBF /* MaskedInputController.m */; }; + ED7284E21CE960E2006768D6 /* DropDownController.m in Sources */ = {isa = PBXBuildFile; fileRef = ED7284E11CE960E2006768D6 /* DropDownController.m */; }; + ED79E2D21CF2915900FB4F4B /* AutoCompleteController.m in Sources */ = {isa = PBXBuildFile; fileRef = ED79E2CF1CF2915900FB4F4B /* AutoCompleteController.m */; }; + ED79E2D31CF2915900FB4F4B /* AutoCompleteData.m in Sources */ = {isa = PBXBuildFile; fileRef = ED79E2D11CF2915900FB4F4B /* AutoCompleteData.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4C03A20C1D257DF60002EB08 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C03A2661D2581EA0002EB08 /* XuniCalendarDynamicKit.framework in Embed Frameworks */, + 4C03A20B1D257DF50002EB08 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C03A2091D257DF50002EB08 /* XuniInputDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 4C03A2631D2581E70002EB08 /* XuniCalendarDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCalendarDynamicKit.framework; path = ../../../Controls/XuniCalendarDynamicKit.framework; sourceTree = ""; }; + 4C0A768F1D257CB90020670C /* XuniInputDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniInputDynamicKit.framework; path = ../../../Controls/XuniInputDynamicKit.framework; sourceTree = ""; }; + 4C0A76901D257CB90020670C /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C393DD41D266C230053B783 /* XuniCoreDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniCoreDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniCoreDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 4C393DD51D266C230053B783 /* XuniInputDesignTimeStoryboardSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XuniInputDesignTimeStoryboardSupport.m; path = ../../../Controls/XuniInputDesignTimeStoryboardSupport.m; sourceTree = ""; }; + 844FD0DD1CED8F6E0011DEA1 /* ComboBoxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComboBoxController.h; path = Samples/ComboBoxController.h; sourceTree = ""; }; + 844FD0DE1CED8F6E0011DEA1 /* ComboBoxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboBoxController.m; path = Samples/ComboBoxController.m; sourceTree = ""; }; + 84837B011CE574FC0008468B /* License.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = License.h; sourceTree = ""; }; + 84837B021CE574FC0008468B /* License.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = License.m; sourceTree = ""; }; + 84BD217D1D13E35900CCE1BF /* input_autocomplete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_autocomplete.png; path = Images/input_autocomplete.png; sourceTree = ""; }; + 84BD217E1D13E35900CCE1BF /* input_combobox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_combobox.png; path = Images/input_combobox.png; sourceTree = ""; }; + 84BD217F1D13E35900CCE1BF /* input_dropdown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_dropdown.png; path = Images/input_dropdown.png; sourceTree = ""; }; + 84BD21801D13E35900CCE1BF /* input_mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_mask.png; path = Images/input_mask.png; sourceTree = ""; }; + 84D3834C1CD8431C004C1DBF /* Input101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Input101.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84D383501CD8431C004C1DBF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 84D383521CD8431C004C1DBF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 84D383531CD8431C004C1DBF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 84D383591CD8431C004C1DBF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 84D3835B1CD8431C004C1DBF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 84D3835E1CD8431C004C1DBF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 84D383601CD8431C004C1DBF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 84D383711CD87859004C1DBF /* MaskedInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MaskedInputController.h; path = Samples/MaskedInputController.h; sourceTree = ""; }; + 84D383721CD87859004C1DBF /* MaskedInputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MaskedInputController.m; path = Samples/MaskedInputController.m; sourceTree = ""; }; + ED7284E01CE960E2006768D6 /* DropDownController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DropDownController.h; path = Samples/DropDownController.h; sourceTree = ""; }; + ED7284E11CE960E2006768D6 /* DropDownController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DropDownController.m; path = Samples/DropDownController.m; sourceTree = ""; }; + ED79E2CE1CF2915900FB4F4B /* AutoCompleteController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoCompleteController.h; path = Samples/AutoCompleteController.h; sourceTree = ""; }; + ED79E2CF1CF2915900FB4F4B /* AutoCompleteController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AutoCompleteController.m; path = Samples/AutoCompleteController.m; sourceTree = ""; }; + ED79E2D01CF2915900FB4F4B /* AutoCompleteData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoCompleteData.h; path = Samples/AutoCompleteData.h; sourceTree = ""; }; + ED79E2D11CF2915900FB4F4B /* AutoCompleteData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AutoCompleteData.m; path = Samples/AutoCompleteData.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84D383491CD8431C004C1DBF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4C03A2651D2581EA0002EB08 /* XuniCalendarDynamicKit.framework in Frameworks */, + 4C03A2641D2581E70002EB08 /* XuniCalendarDynamicKit.framework in Frameworks */, + 4C03A20A1D257DF50002EB08 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C0A76911D257CB90020670C /* XuniInputDynamicKit.framework in Frameworks */, + 4C0A76921D257CB90020670C /* XuniCoreDynamicKit.framework in Frameworks */, + 4C03A2081D257DF50002EB08 /* XuniInputDynamicKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84D383431CD8431C004C1DBF = { + isa = PBXGroup; + children = ( + 4C393DD41D266C230053B783 /* XuniCoreDesignTimeStoryboardSupport.m */, + 4C393DD51D266C230053B783 /* XuniInputDesignTimeStoryboardSupport.m */, + 4C03A2631D2581E70002EB08 /* XuniCalendarDynamicKit.framework */, + 4C0A768F1D257CB90020670C /* XuniInputDynamicKit.framework */, + 4C0A76901D257CB90020670C /* XuniCoreDynamicKit.framework */, + 84D3834E1CD8431C004C1DBF /* Input101 */, + 84D3834D1CD8431C004C1DBF /* Products */, + ); + sourceTree = ""; + }; + 84D3834D1CD8431C004C1DBF /* Products */ = { + isa = PBXGroup; + children = ( + 84D3834C1CD8431C004C1DBF /* Input101.app */, + ); + name = Products; + sourceTree = ""; + }; + 84D3834E1CD8431C004C1DBF /* Input101 */ = { + isa = PBXGroup; + children = ( + 84D383521CD8431C004C1DBF /* AppDelegate.h */, + 84D383531CD8431C004C1DBF /* AppDelegate.m */, + 84D3835B1CD8431C004C1DBF /* Assets.xcassets */, + 84D3836E1CD876F7004C1DBF /* Images */, + 84D383601CD8431C004C1DBF /* Info.plist */, + 84D3835D1CD8431C004C1DBF /* LaunchScreen.storyboard */, + 84837B011CE574FC0008468B /* License.h */, + 84837B021CE574FC0008468B /* License.m */, + 84D383581CD8431C004C1DBF /* Main.storyboard */, + 84D3836D1CD876F1004C1DBF /* Samples */, + 84D3834F1CD8431C004C1DBF /* Supporting Files */, + ); + path = Input101; + sourceTree = ""; + }; + 84D3834F1CD8431C004C1DBF /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 84D383501CD8431C004C1DBF /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 84D3836D1CD876F1004C1DBF /* Samples */ = { + isa = PBXGroup; + children = ( + ED79E2CE1CF2915900FB4F4B /* AutoCompleteController.h */, + ED79E2CF1CF2915900FB4F4B /* AutoCompleteController.m */, + ED79E2D01CF2915900FB4F4B /* AutoCompleteData.h */, + ED79E2D11CF2915900FB4F4B /* AutoCompleteData.m */, + 844FD0DD1CED8F6E0011DEA1 /* ComboBoxController.h */, + 844FD0DE1CED8F6E0011DEA1 /* ComboBoxController.m */, + ED7284E01CE960E2006768D6 /* DropDownController.h */, + ED7284E11CE960E2006768D6 /* DropDownController.m */, + 84D383711CD87859004C1DBF /* MaskedInputController.h */, + 84D383721CD87859004C1DBF /* MaskedInputController.m */, + ); + name = Samples; + sourceTree = ""; + }; + 84D3836E1CD876F7004C1DBF /* Images */ = { + isa = PBXGroup; + children = ( + 84BD217D1D13E35900CCE1BF /* input_autocomplete.png */, + 84BD217E1D13E35900CCE1BF /* input_combobox.png */, + 84BD217F1D13E35900CCE1BF /* input_dropdown.png */, + 84BD21801D13E35900CCE1BF /* input_mask.png */, + ); + name = Images; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84D3834B1CD8431C004C1DBF /* Input101 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84D383631CD8431C004C1DBF /* Build configuration list for PBXNativeTarget "Input101" */; + buildPhases = ( + 84D383481CD8431C004C1DBF /* Sources */, + 84D383491CD8431C004C1DBF /* Frameworks */, + 84D3834A1CD8431C004C1DBF /* Resources */, + 4C03A20C1D257DF60002EB08 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Input101; + productName = Input101; + productReference = 84D3834C1CD8431C004C1DBF /* Input101.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84D383441CD8431C004C1DBF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = ComponentOne; + TargetAttributes = { + 84D3834B1CD8431C004C1DBF = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 84D383471CD8431C004C1DBF /* Build configuration list for PBXProject "Input101" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 84D383431CD8431C004C1DBF; + productRefGroup = 84D3834D1CD8431C004C1DBF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84D3834B1CD8431C004C1DBF /* Input101 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84D3834A1CD8431C004C1DBF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84BD21811D13E35900CCE1BF /* input_autocomplete.png in Resources */, + 84D3835F1CD8431C004C1DBF /* LaunchScreen.storyboard in Resources */, + 84BD21831D13E35900CCE1BF /* input_dropdown.png in Resources */, + 84D3835C1CD8431C004C1DBF /* Assets.xcassets in Resources */, + 84BD21841D13E35900CCE1BF /* input_mask.png in Resources */, + 84BD21821D13E35900CCE1BF /* input_combobox.png in Resources */, + 84D3835A1CD8431C004C1DBF /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84D383481CD8431C004C1DBF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D383541CD8431C004C1DBF /* AppDelegate.m in Sources */, + 4C393DD61D266C230053B783 /* XuniCoreDesignTimeStoryboardSupport.m in Sources */, + ED79E2D31CF2915900FB4F4B /* AutoCompleteData.m in Sources */, + 84D383511CD8431C004C1DBF /* main.m in Sources */, + 844FD0DF1CED8F6E0011DEA1 /* ComboBoxController.m in Sources */, + ED7284E21CE960E2006768D6 /* DropDownController.m in Sources */, + 4C393DD71D266C230053B783 /* XuniInputDesignTimeStoryboardSupport.m in Sources */, + 84D383731CD87859004C1DBF /* MaskedInputController.m in Sources */, + 84837B031CE574FC0008468B /* License.m in Sources */, + ED79E2D21CF2915900FB4F4B /* AutoCompleteController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84D383581CD8431C004C1DBF /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84D383591CD8431C004C1DBF /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 84D3835D1CD8431C004C1DBF /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84D3835E1CD8431C004C1DBF /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84D383611CD8431C004C1DBF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 84D383621CD8431C004C1DBF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 84D383641CD8431C004C1DBF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; + INFOPLIST_FILE = Input101/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = GrapeCity.Input101; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 84D383651CD8431C004C1DBF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; + INFOPLIST_FILE = Input101/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = GrapeCity.Input101; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84D383471CD8431C004C1DBF /* Build configuration list for PBXProject "Input101" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D383611CD8431C004C1DBF /* Debug */, + 84D383621CD8431C004C1DBF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D383631CD8431C004C1DBF /* Build configuration list for PBXNativeTarget "Input101" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D383641CD8431C004C1DBF /* Debug */, + 84D383651CD8431C004C1DBF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84D383441CD8431C004C1DBF /* Project object */; +} diff --git a/ObjectiveC/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ObjectiveC/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1fd20e1 --- /dev/null +++ b/ObjectiveC/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ObjectiveC/Input101/Input101/AppDelegate.h b/ObjectiveC/Input101/Input101/AppDelegate.h new file mode 100644 index 0000000..74ac888 --- /dev/null +++ b/ObjectiveC/Input101/Input101/AppDelegate.h @@ -0,0 +1,16 @@ +// +// AppDelegate.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/ObjectiveC/Input101/Input101/AppDelegate.m b/ObjectiveC/Input101/Input101/AppDelegate.m new file mode 100644 index 0000000..13d16a5 --- /dev/null +++ b/ObjectiveC/Input101/Input101/AppDelegate.m @@ -0,0 +1,53 @@ +// +// AppDelegate.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +@import XuniCoreDynamicKit; +@import XuniInputDynamicKit; + +#import "AppDelegate.h" +#import "License.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + [XuniLicenseManager setKey:key]; + [XuniComboBox class]; + [XuniMaskedTextField class]; + [XuniDropDown class]; + [XuniAutoComplete class]; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..c4071ec --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,81 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-Small-40@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x-1-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000..6092bc7 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..d468678 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000..2f7ac47 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png new file mode 100644 index 0000000..abee98b Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Australia.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Australia.png new file mode 100644 index 0000000..8937404 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Australia.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json new file mode 100644 index 0000000..c937edd --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Australia.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json new file mode 100644 index 0000000..4424209 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "bangladesh.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png new file mode 100644 index 0000000..8ef2443 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png new file mode 100644 index 0000000..47a007f Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json new file mode 100644 index 0000000..d75e135 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Brazil.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png new file mode 100644 index 0000000..bfff414 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json new file mode 100644 index 0000000..ca05415 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Canada.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/Contents.json new file mode 100644 index 0000000..b677330 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "china.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/china.png b/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/china.png new file mode 100644 index 0000000..d0da550 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/China.imageset/china.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/Contents.json new file mode 100644 index 0000000..d011da7 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "France.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/France.png b/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/France.png new file mode 100644 index 0000000..12318d4 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/France.imageset/France.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json new file mode 100644 index 0000000..c06bb39 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Germany.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png new file mode 100644 index 0000000..77e9338 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/Contents.json new file mode 100644 index 0000000..6922a57 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "india.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/india.png b/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/india.png new file mode 100644 index 0000000..e0a8865 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/India.imageset/india.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json new file mode 100644 index 0000000..0d7f5d1 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "japan.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png new file mode 100644 index 0000000..29c45d5 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json new file mode 100644 index 0000000..19dcbf3 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "nepal.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png new file mode 100644 index 0000000..f011adc Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json new file mode 100644 index 0000000..6a0cbfe --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "pakistan.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png new file mode 100644 index 0000000..1630f55 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json new file mode 100644 index 0000000..a17c190 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "srilanka.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png b/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png new file mode 100644 index 0000000..2a7d925 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json new file mode 100644 index 0000000..a863b15 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "tip.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "tip@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "tip@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip.png b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip.png new file mode 100644 index 0000000..622b0b2 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png new file mode 100644 index 0000000..18facde Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png differ diff --git a/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png new file mode 100644 index 0000000..9a343d2 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png differ diff --git a/ObjectiveC/Input101/Input101/Base.lproj/LaunchScreen.storyboard b/ObjectiveC/Input101/Input101/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..cd15a2f --- /dev/null +++ b/ObjectiveC/Input101/Input101/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ObjectiveC/Input101/Input101/Base.lproj/Main.storyboard b/ObjectiveC/Input101/Input101/Base.lproj/Main.storyboard new file mode 100644 index 0000000..e64fe2f --- /dev/null +++ b/ObjectiveC/Input101/Input101/Base.lproj/Main.storyboard @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ObjectiveC/Input101/Input101/Images/input_autocomplete.png b/ObjectiveC/Input101/Input101/Images/input_autocomplete.png new file mode 100644 index 0000000..1a3342f Binary files /dev/null and b/ObjectiveC/Input101/Input101/Images/input_autocomplete.png differ diff --git a/ObjectiveC/Input101/Input101/Images/input_combobox.png b/ObjectiveC/Input101/Input101/Images/input_combobox.png new file mode 100644 index 0000000..03057f7 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Images/input_combobox.png differ diff --git a/ObjectiveC/Input101/Input101/Images/input_dropdown.png b/ObjectiveC/Input101/Input101/Images/input_dropdown.png new file mode 100644 index 0000000..a1b491e Binary files /dev/null and b/ObjectiveC/Input101/Input101/Images/input_dropdown.png differ diff --git a/ObjectiveC/Input101/Input101/Images/input_mask.png b/ObjectiveC/Input101/Input101/Images/input_mask.png new file mode 100644 index 0000000..a88a992 Binary files /dev/null and b/ObjectiveC/Input101/Input101/Images/input_mask.png differ diff --git a/ObjectiveC/Input101/Input101/Info.plist b/ObjectiveC/Input101/Input101/Info.plist new file mode 100644 index 0000000..9a91652 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + GrapeCity.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/ObjectiveC/Input101/Input101/License.h b/ObjectiveC/Input101/Input101/License.h new file mode 100644 index 0000000..60e5f92 --- /dev/null +++ b/ObjectiveC/Input101/Input101/License.h @@ -0,0 +1,10 @@ +// +// License.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +extern NSString *const key; diff --git a/ObjectiveC/Input101/Input101/License.m b/ObjectiveC/Input101/Input101/License.m new file mode 100644 index 0000000..c133248 --- /dev/null +++ b/ObjectiveC/Input101/Input101/License.m @@ -0,0 +1,10 @@ +// +// License.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "License.h" + +NSString *const key = @"ABgBGAIYB4BJAG4AcAB1AHQAMQAwADEAEM5e/j4SMW2WhbOdrPn9/iL6gIlWw9hypAk4iAn6Sm5uA7PTpgi01B7EntbZzt4nkSi8oAwO0XSM6xPla8s1Er8w77Ffpca/DWHFHWakD45bUlZ5sGqNN1ASViKG3/1FoyJA517oIWb4K2bFtgvoBYPYG3Wl/+Jo+INuMmfQf9WT03EsRxEUD53AJ1cVACRnDq3akHJEPSnljj1/0jqM4JLKnfLQIhXLmYkjn1Z54BrT46NTPfQBBAmVHj0TPd7N/+axZBuDHEIFcpP9m4HnOKbl/ltghsEr19zmdBs2XVa57NR/Omqng18GasvevcZcVZixSbEunTu9prnDlyc+EAu8mdKxy7K9PnsuwWAlS9pTGTL6u+If/OXGgZfFj52Btrc1r0yiz5z5e2O92mCsbNpWQJCYHy8kluMSIkSIpDiPb45WRKoeslvolGOaKa00Ft6RdddqW66RyoKc9DrxiBowPuPwG1EbJIEXtrk4b6jW0Q9d2KOjxMikKPg28sO2Ti56G4DxqtSJbJYD6o2wz/EtjHAYJA1AUJVafXMkcdCxytQ5XpElKF68CyOGHeONanc9qxo9YheROEzaQ2leAXhoiMbH93F4E6F/yovgLJCvN2cRCTswDdVmGkHXwoxaKOXgCW45ZUtTDCVbTBCUj7ALtE8AR629qFpfOnrarbgwggVkMIIETKADAgECAhAiELIXSwsSf7soBS4RsyUKMA0GCSqGSIb3DQEBBQUAMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2lnbiBDbGFzcyAzIENvZGUgU2lnbmluZyAyMDEwIENBMB4XDTEzMDkyNDAwMDAwMFoXDTE2MTAyMzIzNTk1OVowgacxCzAJBgNVBAYTAlVTMRUwEwYDVQQIEwxQZW5uc3lsdmFuaWExEzARBgNVBAcTClBpdHRzYnVyZ2gxFTATBgNVBAoUDENvbXBvbmVudE9uZTE+MDwGA1UECxM1RGlnaXRhbCBJRCBDbGFzcyAzIC0gTWljcm9zb2Z0IFNvZnR3YXJlIFZhbGlkYXRpb24gdjIxFTATBgNVBAMUDENvbXBvbmVudE9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALnLoJqpSVVqnJLza05lTIcakcvyl7dxBxZ+cwk4Cqk6+UaC6f5Z5LvRD1+AhiARulIgI7vPgkCf+c83iOViQWyJuXFJMnGava3AZ6X/o0DaUqzYzFOWz/MrAzOJvYMtrj/NT9m8BWei+UkY1NWUytiSa0JINYt55i/FztxXtP7K27Lj3ZYwwUkNLOKJ4f+qkR0QSnygYUQQyMDOLg5vfYkDLdUQkNretBT2JZ6x6dkNcCpif5dbZ01MOFEEjZJlGdnvrenuOYfw5CNloDSCRzttSJ89JtJOjQxyrBQf1ylOXoiXCPpzAXCU2SF/dYXSimVM8pT0NZ7pUNG1H+Az2nMCAwEAAaOCAXswggF3MAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgeAMEAGA1UdHwQ5MDcwNaAzoDGGL2h0dHA6Ly9jc2MzLTIwMTAtY3JsLnZlcmlzaWduLmNvbS9DU0MzLTIwMTAuY3JsMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwMwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYTATBgNVHSUEDDAKBggrBgEFBQcDAzBxBggrBgEFBQcBAQRlMGMwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA7BggrBgEFBQcwAoYvaHR0cDovL2NzYzMtMjAxMC1haWEudmVyaXNpZ24uY29tL0NTQzMtMjAxMC5jZXIwHwYDVR0jBBgwFoAUz5mp6nsm9EvJjo/X8AUm7+PSp50wEQYJYIZIAYb4QgEBBAQDAgQQMBYGCisGAQQBgjcCARsECDAGAQEAAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBhzVY5zjwYAFjmIa2JSWbqeXQ1jrf2o5DoRYWgI/+4LEpJ+U2o+VAI5kIYSNGp5Yjq7XvQosjs/C6qdwpfTd3bh2lEER4XCRzpo+4HK9Wxwj0D8P1UoUn43LjlbMB/GzRRhNq0BN+ETlD0+BejspoUssd5GRhGLNOXmtDV+9/a7j7h9t5JEMk++JblysVe6UpcgtoY9XguZLsm5DOhQT0QIlgOIK1QSl/whiKGdPBfD5jN4/SHsGVUbPpC+Pxjh5yT/LSm9+Nqk+tzMQQcpbTfeLKs9kLgsG4Uo9fsg5wOl4FN4CBHo2CLXEqtriy3//rpUMOutVKmm1awHhgGqsuFMIICuDCCAaCgAwIBAgIIDz3opNHfYG8wDQYJKoZIhvcNAQEFBQAwHDEaMBgGA1UEAwwRR0MtU1UxMTUwMC02NjY2NjYwHhcNMTUwMTAxMDAwMDAwWhcNMTgwNDMwMDAwMDAwWjAcMRowGAYDVQQDDBFHQy1TVTExNTAwLTY2NjY2NjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALGow9bwScG7KAtAWVydZUApG0MrMJNuWpf0T87RbtiAbbHSlNgbma3izL4PQqRR9yCRdwJDtQ5UxuGfF0/IrerZDAzopnYHZSpuJT9p72VAX/M6eHJPb4vINT6hsc3WMPHRwroBLK3Ul82xedlnoDTBz/PWmezsr9NI/zGwo4/n6b0Z/5KY8LTqP2IYSwJN4CiGQ7etJ18KKpTfEAs5r9BwJBy565yZEizvyrL/u5k+1yS19DgkaG5p43TLkUNNK+fJjeUpI2yMoWcwT3ztkkSU8VFMia3ORRg9tu86p1D1ck5dW2oWDbqrik1cm06CIrcfCXwYeX5VpnshwkGm9GECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAo2/0yiTPGERQMjgf7wRUO21nP7qFnptAaznXQUINgUYhnFTlvRQ8PN1sI1a027XTCFuCi2kgB8FjDHMtNAWD10ZCJDGhfOnbBbld0VNSQvQDtG3ORrTaNKnpWt4FxZWS6IgYmOXMK97UyWMMd3MedVwRtuzksrZ/pgh8GHi+I7cA9aIDLiroobmt0X+XyLuwskdbfMxFePUDpAdM7hsfnZ+VZJTs6ed4Irad3BLrqMu+9MPTaqR38M3aK6OpMAD5IydH9O0G2HaEeZUSxyDCqw+LcY4uZh+B4dyQ/itkAxfkRXKzoJDXBY4+PYhO2+xm1NPaj+2DC4PlMo3HdySCPQ=="; diff --git a/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.h b/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.h new file mode 100644 index 0000000..e334c95 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.h @@ -0,0 +1,12 @@ +// +// AutoCompleteController.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface AutoCompleteController : UIViewController + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.m b/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.m new file mode 100644 index 0000000..288ff67 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/AutoCompleteController.m @@ -0,0 +1,142 @@ +// +// AutoCompleteController.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "AutoCompleteController.h" +@import XuniInputDynamicKit; +#import "AutoCompleteData.h" + +@interface AutoCompleteController () +@property (weak, nonatomic) IBOutlet XuniAutoComplete *customDropdown; +@property (weak, nonatomic) IBOutlet XuniAutoComplete *highlightDropdown; +@property (weak, nonatomic) IBOutlet XuniAutoComplete *delayDropdown; +@property (weak, nonatomic) IBOutlet XuniAutoComplete *filterDropdown; + +@end + +@implementation AutoCompleteController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"AutoComplete"; + // Do any additional setup after loading the view. + + _highlightDropdown.dropDownHeight = 200; + _highlightDropdown.displayMemberPath = @"name"; + _highlightDropdown.isAnimated = YES; + _highlightDropdown.itemsSource = [AutoCompleteData demoData]; + _highlightDropdown.showButton = NO; + + _delayDropdown.dropDownHeight = 200; + _delayDropdown.displayMemberPath = @"name"; + _delayDropdown.isAnimated = YES; + _delayDropdown.itemsSource = [AutoCompleteData demoData]; + _delayDropdown.delay = 1000; + _delayDropdown.showButton = NO; + +// _customDropdown.autoComplete = self; + _customDropdown.tableView.delegate = self; + _customDropdown.tableView.dataSource = self; + _customDropdown.dropDownHeight = 200; + _customDropdown.displayMemberPath = @"name"; + _customDropdown.isAnimated = YES; + _customDropdown.highlightedColor = [UIColor redColor]; + _customDropdown.itemsSource = [AutoCompleteData demoData1]; + + _filterDropdown.dropDownHeight = 200; + _filterDropdown.displayMemberPath = @"name"; + _filterDropdown.isAnimated = YES; + _filterDropdown.delegate = self; + _filterDropdown.itemsSource = [AutoCompleteData demoData]; + _filterDropdown.filteringArgs.cancel = YES; + +} + +-(void)filtering:(XuniAutoComplete *)sender eventArgs:(XuniAutoCompleteFilteringEventArgs *)eventArgs +{ + sender.collectionView.filter = ^ BOOL (NSObject *item){ + AutoCompleteData *data = (AutoCompleteData*)item; + NSString *string = data.name; + if ([[[string substringToIndex:1] lowercaseString] isEqualToString:@"b"]) { + return true; + } + return false; + }; + sender.itemsSource = [NSMutableArray arrayWithArray:sender.collectionView.items]; +// sender.filteringArgs.cancel = NO; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return _customDropdown.temporaryItemSource.count; +} + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 50; +} + +- (UITableViewCell *)tableView:(UITableView *)tableview cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableview dequeueReusableCellWithIdentifier:@"simpleIdentifier"]; + + if (cell == nil){ + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"simpleIdentifier"]; + } + + UIView *selectedBackgroundView = [[UIView alloc] init]; + selectedBackgroundView.backgroundColor = [UIColor colorWithRed:0 / 255.0 green:122 / 255.0 blue:255 / 255.0 alpha:1.0]; + cell.selectedBackgroundView = selectedBackgroundView; + [cell.contentView.subviews makeObjectsPerformSelector: @selector(removeFromSuperview)]; + + CGRect rect = cell.contentView.frame; + AutoCompleteData *data = (AutoCompleteData *)[_customDropdown.temporaryItemSource objectAtIndex:indexPath.row]; + NSString *imageName = data.imageString; + + UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:imageName]]; + image.frame = CGRectMake(8, 0, 48, 48); + [cell.contentView addSubview:image]; + + UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(65, 10, rect.size.width - 40, rect.size.height / 2)]; + label1.text = data.name; + [cell.contentView addSubview:label1]; + + [_customDropdown normalizeCellText:label1 WithSubstring:label1.text]; + if(_customDropdown.filterString) + { + [_customDropdown highlightedSubstring:_customDropdown.filterString inFilterCellText:label1]; + } + + return cell; +} + +- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { + // Remove seperator inset. + if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { + [cell setSeparatorInset:UIEdgeInsetsZero]; + } + + // Prevent the cell from inheriting the Table View's margin settings. + if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) { + [cell setPreservesSuperviewLayoutMargins:NO]; + } + + // Explictly set cell's layout margins. + if ([cell respondsToSelector:@selector(setLayoutMargins:)]) { + [cell setLayoutMargins:UIEdgeInsetsZero]; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + _customDropdown.selectedIndex = indexPath.row; + _customDropdown.isDropDownOpen = NO; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.h b/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.h new file mode 100644 index 0000000..0cfac12 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.h @@ -0,0 +1,22 @@ +// +// AutoCompleteData.h +// XuniInput +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface AutoCompleteData : NSObject + +@property NSString *name; +@property NSString *imageString; + +- (id)initWithName:(NSString *)name; + +- (id)initWithName:(NSString *)name imageString:(NSString *)imageString; + ++ (NSMutableArray *)demoData; ++ (NSMutableArray *)demoData1; + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.m b/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.m new file mode 100644 index 0000000..07ac5f6 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/AutoCompleteData.m @@ -0,0 +1,51 @@ +// +// AutoCompleteData.m +// XuniInput +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "AutoCompleteData.h" + +@implementation AutoCompleteData + +- (id)initWithName:(NSString *)name{ + self = [super init]; + if(self){ + _name = name; + } + return self; +} + +- (id)initWithName:(NSString *)name imageString:(NSString *)imageString{ + self = [super init]; + if(self){ + _name = name; + _imageString = imageString; + } + return self; +} + ++ (NSMutableArray *)demoData { + NSMutableArray *dataArray = [[NSMutableArray alloc]init]; + NSArray *array = @[@"Australia",@"Bangladesh",@"Brazil",@"Canada", @"China", @"France",@"Germany",@"India", @"Japan", @"Nepal", @"Pakistan", @"Srilanka"]; + for (int i = 0; i < array.count; i++) { + AutoCompleteData *data = [[AutoCompleteData alloc]initWithName:array[i]]; + [dataArray addObject:data]; + } + return dataArray; + +} + ++ (NSMutableArray *)demoData1 { + NSMutableArray *dataArray = [[NSMutableArray alloc]init]; + NSArray *textArray = @[@"Australia",@"Bangladesh",@"Brazil",@"Canada", @"China", @"France",@"Germany",@"India", @"Japan", @"Nepal", @"Pakistan", @"Srilanka"]; + NSArray *imageArray = @[@"Australia",@"Bangladesh",@"Brazil",@"Canada", @"China", @"France",@"Germany",@"India", @"Japan", @"Nepal", @"Pakistan", @"Srilanka"]; + for (int i = 0; i < textArray.count; i++) { + AutoCompleteData *data = [[AutoCompleteData alloc]initWithName:textArray[i] imageString:imageArray[i]]; + [dataArray addObject:data]; + } + return dataArray; +} + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/ComboBoxController.h b/ObjectiveC/Input101/Input101/Samples/ComboBoxController.h new file mode 100644 index 0000000..f77b5af --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/ComboBoxController.h @@ -0,0 +1,12 @@ +// +// ComboBoxController.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface ComboBoxController : UIViewController + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/ComboBoxController.m b/ObjectiveC/Input101/Input101/Samples/ComboBoxController.m new file mode 100644 index 0000000..7ab8a3f --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/ComboBoxController.m @@ -0,0 +1,56 @@ +// +// ComboBoxController.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "ComboBoxController.h" +@import XuniInputDynamicKit; +#import "AutoCompleteData.h" + +@interface ComboBoxController () + +@property (weak, nonatomic) IBOutlet XuniComboBox *comboBoxEdit; +@property (weak, nonatomic) IBOutlet XuniComboBox *comboBoxNonEdit; + +@end + +@implementation ComboBoxController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view. + self.comboBoxEdit.delegate = self; + self.comboBoxEdit.displayMemberPath = @"name"; + self.comboBoxEdit.itemsSource = [AutoCompleteData demoData];; + self.comboBoxEdit.dropDownHeight = 200; + self.comboBoxEdit.placeholder = @"Please Enter..."; + + self.comboBoxNonEdit.delegate = self; + self.comboBoxNonEdit.displayMemberPath = @"name"; + self.comboBoxNonEdit.itemsSource = [AutoCompleteData demoData];; + self.comboBoxNonEdit.isEditable = NO; + self.comboBoxNonEdit.dropDownBehavior = XuniDropDownBehaviorHeaderTap; + self.comboBoxNonEdit.dropDownHeight = 200; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end + + diff --git a/ObjectiveC/Input101/Input101/Samples/DropDownController.h b/ObjectiveC/Input101/Input101/Samples/DropDownController.h new file mode 100644 index 0000000..49a1bd1 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/DropDownController.h @@ -0,0 +1,12 @@ +// +// DropDownController.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface DropDownController : UIViewController + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/DropDownController.m b/ObjectiveC/Input101/Input101/Samples/DropDownController.m new file mode 100644 index 0000000..a457bdb --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/DropDownController.m @@ -0,0 +1,59 @@ +// +// DropDownController.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "DropDownController.h" +@import XuniInputDynamicKit; +@import XuniCalendarDynamicKit; + +@interface DropDownController () +@property (weak, nonatomic) IBOutlet XuniDropDown *dropdown; + +@end + +@implementation DropDownController +{ + XuniMaskedTextField *_field; + XuniDropDownView *_dropdownView; + XuniCalendar *_calendar; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"DropDown"; + + // Do any additional setup after loading the view. + _dropdown.buttonColor = [UIColor lightGrayColor]; + _dropdown.dropDownHeight = 300; + _dropdown.dropDownWidth = _dropdown.frame.size.width + 30; + _dropdown.dropDownDirection = XuniDropDownDirectionForceBelow; + _dropdown.isAnimated = YES; + + _field = [[XuniMaskedTextField alloc] init]; + _field.mask = @"00/00/0000"; + _field.borderStyle = UITextBorderStyleNone; + _dropdown.header = _field; + + _calendar = [[XuniCalendar alloc] init]; + _calendar.delegate = self; + _dropdown.dropDownView = _calendar; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)selectionChanged:(XuniCalendar *)sender selectedDates:(XuniCalendarRange*)selectedDates +{ + NSDateFormatter *_dateFormatter = [[NSDateFormatter alloc]init]; + _dateFormatter.dateFormat = @"MM/dd/yyyy"; + _field.text = [_dateFormatter stringFromDate:((XuniCalendar *)sender).selectedDate]; + _dropdown.isDropDownOpen = NO; +} + +@end diff --git a/ObjectiveC/Input101/Input101/Samples/MaskedInputController.h b/ObjectiveC/Input101/Input101/Samples/MaskedInputController.h new file mode 100644 index 0000000..b66d0b4 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/MaskedInputController.h @@ -0,0 +1,14 @@ +// +// MaskedInputController.h +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import + +@interface MaskedInputController : UIViewController + + +@end + diff --git a/ObjectiveC/Input101/Input101/Samples/MaskedInputController.m b/ObjectiveC/Input101/Input101/Samples/MaskedInputController.m new file mode 100644 index 0000000..02b4ed2 --- /dev/null +++ b/ObjectiveC/Input101/Input101/Samples/MaskedInputController.m @@ -0,0 +1,37 @@ +// +// MaskedInputController.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import "MaskedInputController.h" +@import XuniInputDynamicKit; + +@interface MaskedInputController () + +@property (weak, nonatomic) IBOutlet XuniMaskedTextField *maskedID; +@property (weak, nonatomic) IBOutlet XuniMaskedTextField *maskedDOB; +@property (weak, nonatomic) IBOutlet XuniMaskedTextField *maskedPhone; +@property (weak, nonatomic) IBOutlet XuniMaskedTextField *maskedState; + +@end + +@implementation MaskedInputController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Do any additional setup after loading the view, typically from a nib. + self.maskedID.mask = @"000-00-0000"; + self.maskedDOB.mask = @"90/90/0000"; + self.maskedPhone.mask = @"(999) 000-0000"; + self.maskedState.mask = @"LL"; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/ObjectiveC/Input101/Input101/main.m b/ObjectiveC/Input101/Input101/main.m new file mode 100644 index 0000000..93c5c40 --- /dev/null +++ b/ObjectiveC/Input101/Input101/main.m @@ -0,0 +1,15 @@ +// +// main.m +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Swift/Calendar101/Calendar101.xcodeproj/project.pbxproj b/Swift/Calendar101/Calendar101.xcodeproj/project.pbxproj index 48e59af..74eef03 100644 --- a/Swift/Calendar101/Calendar101.xcodeproj/project.pbxproj +++ b/Swift/Calendar101/Calendar101.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 843786591CD2ECC000903308 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8437865B1CD2ECC000903308 /* Localizable.strings */; }; 8456E5BC1C7FE813007DBBC9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8456E5BB1C7FE813007DBBC9 /* AppDelegate.swift */; }; 8456E5BE1C7FE813007DBBC9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8456E5BD1C7FE813007DBBC9 /* ViewController.swift */; }; 8456E5C11C7FE813007DBBC9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8456E5BF1C7FE813007DBBC9 /* Main.storyboard */; }; @@ -25,6 +26,11 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 843786551CD2EC7200903308 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 843786561CD2EC7200903308 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 8437865A1CD2ECC000903308 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + 8437865C1CD2ECC200903308 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 8437865D1CD2ECC300903308 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 8456E5B81C7FE813007DBBC9 /* Calendar101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calendar101.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8456E5BB1C7FE813007DBBC9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 8456E5BD1C7FE813007DBBC9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -80,6 +86,7 @@ children = ( 8456E5BB1C7FE813007DBBC9 /* AppDelegate.swift */, 8456E5C21C7FE813007DBBC9 /* Assets.xcassets */, + 8437865B1CD2ECC000903308 /* Localizable.strings */, 8456E5D31C7FF9FA007DBBC9 /* CustomAppearanceController.swift */, 8456E5D51C8001FF007DBBC9 /* CustomDayContentController.swift */, 8456E5D91C8018E4007DBBC9 /* CustomHeaderController.swift */, @@ -138,6 +145,7 @@ knownRegions = ( en, Base, + ja, ); mainGroup = 8456E5AF1C7FE813007DBBC9; productRefGroup = 8456E5B91C7FE813007DBBC9 /* Products */; @@ -155,6 +163,7 @@ buildActionMask = 2147483647; files = ( 8456E5C61C7FE813007DBBC9 /* LaunchScreen.storyboard in Resources */, + 843786591CD2ECC000903308 /* Localizable.strings in Resources */, 8456E5C31C7FE813007DBBC9 /* Assets.xcassets in Resources */, 8456E5C11C7FE813007DBBC9 /* Main.storyboard in Resources */, ); @@ -183,10 +192,21 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 8437865B1CD2ECC000903308 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 8437865A1CD2ECC000903308 /* Base */, + 8437865C1CD2ECC200903308 /* en */, + 8437865D1CD2ECC300903308 /* ja */, + ); + name = Localizable.strings; + sourceTree = ""; + }; 8456E5BF1C7FE813007DBBC9 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 8456E5C01C7FE813007DBBC9 /* Base */, + 843786561CD2EC7200903308 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -195,6 +215,7 @@ isa = PBXVariantGroup; children = ( 8456E5C51C7FE813007DBBC9 /* Base */, + 843786551CD2EC7200903308 /* ja */, ); name = LaunchScreen.storyboard; sourceTree = ""; diff --git a/Swift/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard b/Swift/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard index 64f1ef9..9587a8e 100644 --- a/Swift/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard +++ b/Swift/Calendar101/Calendar101/Base.lproj/LaunchScreen.storyboard @@ -1,5 +1,5 @@ - + diff --git a/Swift/Calendar101/Calendar101/Base.lproj/Localizable.strings b/Swift/Calendar101/Calendar101/Base.lproj/Localizable.strings new file mode 100644 index 0000000..6c05d6d --- /dev/null +++ b/Swift/Calendar101/Calendar101/Base.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2015 GrapeCity. All rights reserved. +*/ diff --git a/Swift/Calendar101/Calendar101/CustomAppearanceController.swift b/Swift/Calendar101/Calendar101/CustomAppearanceController.swift index 676c7c7..bd21c82 100644 --- a/Swift/Calendar101/Calendar101/CustomAppearanceController.swift +++ b/Swift/Calendar101/Calendar101/CustomAppearanceController.swift @@ -14,7 +14,7 @@ class CustomAppearanceController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - self.title = "Custom Appearance" + self.title = NSLocalizedString("Custom Appearance", comment: "") // Do any additional setup after loading the view. _calendar.borderColor = UIColor.blackColor() diff --git a/Swift/Calendar101/Calendar101/CustomDayContentController.swift b/Swift/Calendar101/Calendar101/CustomDayContentController.swift index ad831c2..8ce794b 100644 --- a/Swift/Calendar101/Calendar101/CustomDayContentController.swift +++ b/Swift/Calendar101/Calendar101/CustomDayContentController.swift @@ -25,7 +25,7 @@ class CustomDayContentController: UIViewController, XuniCalendarDelegate { override func viewDidLoad() { super.viewDidLoad() - self.title = "Custom Day Content" + self.title = NSLocalizedString("Custom Day Content", comment: "") // Do any additional setup after loading the view. _calendar.delegate = self @@ -49,17 +49,17 @@ class CustomDayContentController: UIViewController, XuniCalendarDelegate { _calendar.frame = CGRectMake(0, 75, width, width - 75) } - func dayOfWeekSlotLoading(sender: XuniCalendar, args: XuniCalendarDayOfWeekSlotLoadingEventArgs) { - args.dayOfWeekSlot.font = args.isWeekend ? UIFont.italicSystemFontOfSize(11.0) : UIFont.boldSystemFontOfSize(11.0) + func dayOfWeekSlotLoading(sender: XuniCalendar, dayOfWeek: XuniDayOfWeek, isWeekend: Bool, dayOfWeekSlot: UILabel) { + dayOfWeekSlot.font = isWeekend ? UIFont.italicSystemFontOfSize(11.0) : UIFont.boldSystemFontOfSize(11.0) } - func daySlotLoading(sender: XuniCalendar, args: XuniCalendarDaySlotLoadingEventArgs) { - if (args.isAdjacentDay) { - return; + func daySlotLoading(sender: XuniCalendar, date: NSDate, isAdjacentDay: Bool, daySlot: XuniCalendarDaySlotBase) -> XuniCalendarDaySlotBase { + if (isAdjacentDay) { + return daySlot; } - let day = NSCalendar.currentCalendar().components(NSCalendarUnit.Day, fromDate: args.date).day - let rect = args.daySlot.frame + let day = NSCalendar.currentCalendar().components(NSCalendarUnit.Day, fromDate: date).day + let rect = daySlot.frame let size = rect.size var rect1: CGRect var rect2: CGRect @@ -83,7 +83,7 @@ class CustomDayContentController: UIViewController, XuniCalendarDelegate { imageDaySlot.imageSource = UIImage(named: dotIcon[day % 3]) } - args.daySlot = imageDaySlot + return imageDaySlot } /* diff --git a/Swift/Calendar101/Calendar101/CustomHeaderController.swift b/Swift/Calendar101/Calendar101/CustomHeaderController.swift index 400c71c..3a654ce 100644 --- a/Swift/Calendar101/Calendar101/CustomHeaderController.swift +++ b/Swift/Calendar101/Calendar101/CustomHeaderController.swift @@ -19,28 +19,35 @@ class CustomHeaderController: UIViewController, UIPickerViewDelegate, UIPickerVi var _viewTypePicker = UIPickerView() var _dateLabel = UILabel() var _todayBtn = UIButton(type: UIButtonType.System) + var _isEnglish = true override func viewDidLoad() { super.viewDidLoad() self.title = "Custom Header" // Do any additional setup after loading the view. + _dateFormatter.locale = NSLocale(localeIdentifier: "en_US") + let language = NSLocale.preferredLanguages()[0] + _isEnglish = !language.containsString("ja") && !language.containsString("zh") + _viewTypePicker.delegate = self _viewTypePicker.showsSelectionIndicator = true _viewTypePicker.hidden = false - _dateLabel.text = "" - _todayBtn.setTitle("Today", forState: UIControlState.Normal) _todayBtn.addTarget(self, action: "todayBtnClick:", forControlEvents: UIControlEvents.TouchUpInside) _calendar.delegate = self _calendar.showHeader = false + updateDateLabel() + self.view.addSubview(_viewTypePicker) self.view.addSubview(_dateLabel) self.view.addSubview(_todayBtn) self.view.addSubview(_calendar) + + updateDateLabel() } override func didReceiveMemoryWarning() { @@ -78,14 +85,21 @@ class CustomHeaderController: UIViewController, UIPickerViewDelegate, UIPickerVi func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { if (row == 0) { - _calendar.viewMode = XuniCalendarViewMode.Month + _calendar.changeViewModeAsync(XuniCalendarViewMode.Month, date: nil) } else if (row == 1) { - _calendar.viewMode = XuniCalendarViewMode.Year + _calendar.changeViewModeAsync(XuniCalendarViewMode.Year, date: nil) } } func viewModeChanged(sender: XuniCalendar) { + if (_calendar.viewMode == XuniCalendarViewMode.Month) { + _viewTypePicker.selectRow(0, inComponent: 0, animated: false) + } + else if (_calendar.viewMode == XuniCalendarViewMode.Year) { + _viewTypePicker.selectRow(1, inComponent: 0, animated: false) + } + updateDateLabel() } @@ -94,7 +108,7 @@ class CustomHeaderController: UIViewController, UIPickerViewDelegate, UIPickerVi } func updateDateLabel() { - _dateFormatter.dateFormat = (_calendar.viewMode == XuniCalendarViewMode.Month) ? "MMMM yyyy" : "yyyy" + _dateFormatter.dateFormat = (_calendar.viewMode == XuniCalendarViewMode.Month) ? (_isEnglish ? "MMMM yyyy" : "yyyy年M月") : "yyyy" _dateLabel.text = _dateFormatter.stringFromDate(_calendar.displayDate) } diff --git a/Swift/Calendar101/Calendar101/CustomSelectionController.swift b/Swift/Calendar101/Calendar101/CustomSelectionController.swift index 7cc350f..aa857f8 100644 --- a/Swift/Calendar101/Calendar101/CustomSelectionController.swift +++ b/Swift/Calendar101/Calendar101/CustomSelectionController.swift @@ -16,11 +16,11 @@ class CustomSelectionController: UIViewController, XuniCalendarDelegate { override func viewDidLoad() { super.viewDidLoad() - self.title = "Custom Selection" + self.title = NSLocalizedString("Custom Selection", comment: "") // Do any additional setup after loading the view. _stepsLabel.numberOfLines = 3 - _stepsLabel.text = "Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected." + _stepsLabel.text = NSLocalizedString("Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected.", comment: "") _calendar.delegate = self _calendar.maxSelectionCount = -1 @@ -43,15 +43,15 @@ class CustomSelectionController: UIViewController, XuniCalendarDelegate { _calendar.frame = CGRectMake(0, 55 + 100, width, width - 55 - 100) } - func selectionChanging(sender: XuniCalendar, args: XuniCalendarSelectionChangedEventArgs) { - for (var date = args.selectedDates.startDate; - date.compare(args.selectedDates.endDate) == NSComparisonResult.OrderedAscending - || date.compare(args.selectedDates.endDate) == NSComparisonResult.OrderedSame; + func selectionChanging(sender: XuniCalendar, selectedDates: XuniCalendarRange) { + for (var date = selectedDates.startDate; + date.compare(selectedDates.endDate) == NSComparisonResult.OrderedAscending + || date.compare(selectedDates.endDate) == NSComparisonResult.OrderedSame; date = getNextDateOf(date)) { let weekday = NSCalendar.currentCalendar().components(NSCalendarUnit.Weekday, fromDate: date).weekday if (weekday == 1 || weekday == 7) { - args.selectedDates.addExcludedDates(date) + selectedDates.addExcludedDates(date) } } } diff --git a/Swift/Calendar101/Calendar101/GettingStartedController.swift b/Swift/Calendar101/Calendar101/GettingStartedController.swift index 49a41d4..dd285de 100644 --- a/Swift/Calendar101/Calendar101/GettingStartedController.swift +++ b/Swift/Calendar101/Calendar101/GettingStartedController.swift @@ -14,7 +14,7 @@ class GettingStartedController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - self.title = "Getting Started" + self.title = NSLocalizedString("Getting Started", comment: "") // Do any additional setup after loading the view. self.view.addSubview(_calendar) diff --git a/Swift/Calendar101/Calendar101/PopupEditorController.swift b/Swift/Calendar101/Calendar101/PopupEditorController.swift index d4d81ff..c66f7f7 100644 --- a/Swift/Calendar101/Calendar101/PopupEditorController.swift +++ b/Swift/Calendar101/Calendar101/PopupEditorController.swift @@ -53,9 +53,9 @@ class PopupEditorController: UIViewController, XuniCalendarDelegate { _calendar.hidden = !_calendar.hidden } - func selectionChanged(sender: XuniCalendar, args: XuniCalendarSelectionChangedEventArgs) { + func selectionChanged(sender: XuniCalendar, selectedDates: XuniCalendarRange) { _dateFormatter.dateFormat = "M/d/yyyy" - _dateLabel.text = String(format: "The date %@ was selected.", _dateFormatter.stringFromDate(args.selectedDates.startDate)) + _dateLabel.text = String(format: "The date %@ was selected.", _dateFormatter.stringFromDate(selectedDates.startDate)) _calendar.hidden = true } diff --git a/Swift/Calendar101/Calendar101/VerticalOrientationController.swift b/Swift/Calendar101/Calendar101/VerticalOrientationController.swift index 1bd8f18..653fcf0 100644 --- a/Swift/Calendar101/Calendar101/VerticalOrientationController.swift +++ b/Swift/Calendar101/Calendar101/VerticalOrientationController.swift @@ -14,7 +14,7 @@ class VerticalOrientationController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - self.title = "Vertical Orientation" + self.title = NSLocalizedString("Vertical Orientation", comment: "") // Do any additional setup after loading the view. _calendar.orientation = XuniCalendarOrientation.Vertical diff --git a/Swift/Calendar101/Calendar101/ViewController.swift b/Swift/Calendar101/Calendar101/ViewController.swift index 4f6a0c5..4c39d60 100644 --- a/Swift/Calendar101/Calendar101/ViewController.swift +++ b/Swift/Calendar101/Calendar101/ViewController.swift @@ -10,6 +10,24 @@ import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { let samplesTitle = [ + NSLocalizedString("Getting Started", comment: ""), + NSLocalizedString("Vertical Orientation", comment: ""), + NSLocalizedString("Custom Day Content", comment: ""), + NSLocalizedString("Custom Header", comment: ""), + NSLocalizedString("Custom Appearance", comment: ""), + NSLocalizedString("Popup Editor", comment: ""), + NSLocalizedString("Custom Selection", comment: "")] + + let samplesDescription = [ + NSLocalizedString("Shows a basic calendar with selection and interaction.", comment: ""), + NSLocalizedString("Shows a calendar with vertical navigation/scrolling.", comment: ""), + NSLocalizedString("Shows how to customize a day slot to show custom content.", comment: ""), + NSLocalizedString("Shows a custom header inspired by a popular Android or iOS calendar app.", comment: ""), + NSLocalizedString("Shows a calendar with a custom style.", comment: ""), + NSLocalizedString("Shows how to use the control as a pop-up date selector.", comment: ""), + NSLocalizedString("Shows custom selection scenarios.", comment: "")] + + let samplesImage = [ "Getting Started", "Vertical Orientation", "Custom Day Content", @@ -18,15 +36,6 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour "Popup Editor", "Custom Selection"] - let samplesDescription = [ - "Shows a basic calendar with selection and interaction.", - "Shows a calendar with vertical navigation/scrolling.", - "Shows how to customize a day slot to show custom content.", - "Shows a custom header inspired by a popular Android or iOS calendar app.", - "Shows a calendar with a custom style.", - "Shows how to use the control as a pop-up date selector.", - "Shows custom selection scenarios."] - let SimpleIdentifier = "SimpleIdentifier" override func viewDidLoad() { @@ -58,7 +67,7 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour var cell : UITableViewCell? var imageName : String - imageName = samplesTitle[row].stringByReplacingOccurrencesOfString(" ", withString: "") + imageName = samplesImage[row].stringByReplacingOccurrencesOfString(" ", withString: "") imageName = imageName.lowercaseString + ".png" if(cell == nil){ diff --git a/Swift/Calendar101/Calendar101/en.lproj/Localizable.strings b/Swift/Calendar101/Calendar101/en.lproj/Localizable.strings new file mode 100644 index 0000000..e5586ab --- /dev/null +++ b/Swift/Calendar101/Calendar101/en.lproj/Localizable.strings @@ -0,0 +1,49 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2015 GrapeCity. All rights reserved. +*/ + +// Samples Title +"Getting Started" = "Getting Started"; + +"Vertical Orientation" = "Vertical Orientation"; + +"Custom Day Content" = "Custom Day Content"; + +"Custom Header" = "Custom Header"; + +"Custom Appearance" = "Custom Appearance"; + +"Popup Editor" = "Popup Editor"; + +"Custom Selection" = "Custom Selection"; + +// Samples Description +"Shows a basic calendar with selection and interaction." = "Shows a basic calendar with selection and interaction."; + +"Shows a calendar with vertical navigation/scrolling." = "Shows a calendar with vertical navigation/scrolling."; + +"Shows how to customize a day slot to show custom content." = "Shows how to customize a day slot to show custom content."; + +"Shows a custom header inspired by a popular Android or iOS calendar app." = "Shows a custom header inspired by a popular Android or iOS calendar app."; + +"Shows a calendar with a custom style." = "Shows a calendar with a custom style."; + +"Shows how to use the control as a pop-up date selector." = "Shows how to use the control as a pop-up date selector."; + +"Shows custom selection scenarios." = "Shows custom selection scenarios."; + +// Strings +"Month View" = "Month View"; + +"Year View" = "Year View"; + +"Today" = "Today"; + +"Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected." = "Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected."; + +"Pick a date" = "Pick a date"; + +"The date %@ was selected." = "The date %@ was selected."; diff --git a/Swift/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings b/Swift/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings new file mode 100644 index 0000000..a79ed96 --- /dev/null +++ b/Swift/Calendar101/Calendar101/ja.lproj/LaunchScreen.strings @@ -0,0 +1,6 @@ + +/* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "S7t-we-Nel"; */ +"S7t-we-Nel.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; + +/* Class = "UILabel"; text = "Calendar101"; ObjectID = "raF-aS-QHO"; */ +"raF-aS-QHO.text" = "Calendar101"; diff --git a/Swift/Calendar101/Calendar101/ja.lproj/Localizable.strings b/Swift/Calendar101/Calendar101/ja.lproj/Localizable.strings new file mode 100644 index 0000000..f614c63 --- /dev/null +++ b/Swift/Calendar101/Calendar101/ja.lproj/Localizable.strings @@ -0,0 +1,49 @@ +/* + Localizable.strings + Calendar101 + + Copyright (c) 2016 GrapeCity. All rights reserved. +*/ + +// Samples Title +"Getting Started" = "Calendar の基本機能"; + +"Vertical Orientation" = "垂直方向の操作"; + +"Custom Day Content" = "日付領域の変更"; + +"Custom Header" = "ヘッダーのカスタマイズ"; + +"Custom Appearance" = "外観のカスタマイズ"; + +"Popup Editor" = "選択画面"; + +"Custom Selection" = "日付選択のカスタマイズ"; + +// Samples Description +"Shows a basic calendar with selection and interaction." = "カレンダーの日付選択と対話操作"; + +"Shows a calendar with vertical navigation/scrolling." = "縦方向にめくり、スクロール"; + +"Shows how to customize a day slot to show custom content." = "日付を表示する領域に画像など独自の表現を設定"; + +"Shows a custom header inspired by a popular Android or iOS calendar app." = "AndroidやiOSでおなじみの形にカスタマイズ"; + +"Shows a calendar with a custom style." = "独自スタイルを設定したカレンダー"; + +"Shows how to use the control as a pop-up date selector." = "日付選択用の画面をポップアップ表示"; + +"Shows custom selection scenarios." = "カスタマイズした日付選択の利用例"; + +// Strings +"Month View" = "月表示"; + +"Year View" = "年表示"; + +"Today" = "今日"; + +"Step1: Select a date.\nStep2: Select another date in a different week.\nObserve: The weekend days are not selected." = "ステップ1: 日付を選択\nステップ2: 他の週の日付を選択\n結果: 週末を除いた日付のみが選択状態になります"; + +"Pick a date" = "日付の選択"; + +"The date %@ was selected." = " %@ が選択されました"; diff --git a/Swift/Calendar101/Calendar101/ja.lproj/Main.strings b/Swift/Calendar101/Calendar101/ja.lproj/Main.strings new file mode 100644 index 0000000..9da992f --- /dev/null +++ b/Swift/Calendar101/Calendar101/ja.lproj/Main.strings @@ -0,0 +1,6 @@ + +/* Class = "UINavigationItem"; title = "Calendar101"; ObjectID = "Gdm-FG-Jb3"; */ +"Gdm-FG-Jb3.title" = "Calendar101"; + +/* Class = "UIBarButtonItem"; title = "Calendar101"; ObjectID = "Nw0-Ve-Y6E"; */ +"Nw0-Ve-Y6E.title" = "Calendar101"; diff --git a/Swift/CollectionView101/CollectionView101.xcodeproj/project.pbxproj b/Swift/CollectionView101/CollectionView101.xcodeproj/project.pbxproj index 0bfbd0b..fe3c75a 100644 --- a/Swift/CollectionView101/CollectionView101.xcodeproj/project.pbxproj +++ b/Swift/CollectionView101/CollectionView101.xcodeproj/project.pbxproj @@ -14,7 +14,6 @@ 4C31AF7E1C74D4B90094D76F /* flexgrid_loading.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF791C74D4B90094D76F /* flexgrid_loading.png */; }; 4C31AF7F1C74D4B90094D76F /* sort.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF7A1C74D4B90094D76F /* sort.png */; }; 4C31AF871C74EDA40094D76F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4C31AF861C74EDA40094D76F /* Images.xcassets */; }; - 4C31AF891C74EE9D0094D76F /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */; }; 4C31AF8D1C74F0E70094D76F /* YouTubeCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C31AF8C1C74F0E70094D76F /* YouTubeCollectionView.swift */; }; 4C49FECA1C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C49FEC91C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.swift */; }; 4C49FECD1C8F6A7400C4AAEE /* FilteringDemoCanvasTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C49FECC1C8F6A7400C4AAEE /* FilteringDemoCanvasTableViewController.swift */; }; @@ -22,6 +21,7 @@ 4C51F8361C5F4A2600244503 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C51F8341C5F4A2600244503 /* Main.storyboard */; }; 4C51F83B1C5F4A2600244503 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C51F8391C5F4A2600244503 /* LaunchScreen.storyboard */; }; 4C51F8441C5F4C8E00244503 /* SampleData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C51F8431C5F4C8E00244503 /* SampleData.swift */; }; + 4C7CDA901D26E07200F61693 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7CDA8F1D26E07200F61693 /* XuniCoreKit.framework */; }; 4CE12DCD1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DCC1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.swift */; }; 4CE12DD01C86147F0049DF13 /* FilteringSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DCF1C86147F0049DF13 /* FilteringSampleViewController.swift */; }; 4CE12DD31C8614AA0049DF13 /* GroupingSampleTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE12DD21C8614AA0049DF13 /* GroupingSampleTableViewController.swift */; }; @@ -36,7 +36,6 @@ 4C31AF791C74D4B90094D76F /* flexgrid_loading.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_loading.png; sourceTree = ""; }; 4C31AF7A1C74D4B90094D76F /* sort.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sort.png; sourceTree = ""; }; 4C31AF861C74EDA40094D76F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ../Images.xcassets; sourceTree = ""; }; - 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; 4C31AF8C1C74F0E70094D76F /* YouTubeCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YouTubeCollectionView.swift; sourceTree = ""; }; 4C49FEC91C8F5DA900C4AAEE /* YouTubeOnDemandCanvasTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YouTubeOnDemandCanvasTableViewController.swift; sourceTree = ""; }; 4C49FECC1C8F6A7400C4AAEE /* FilteringDemoCanvasTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilteringDemoCanvasTableViewController.swift; sourceTree = ""; }; @@ -48,6 +47,7 @@ 4C51F83A1C5F4A2600244503 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 4C51F83C1C5F4A2600244503 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4C51F8431C5F4C8E00244503 /* SampleData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SampleData.swift; sourceTree = ""; }; + 4C7CDA8F1D26E07200F61693 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = ../../../Controls/XuniCoreKit.framework; sourceTree = ""; }; 4CE12DCC1C8611B30049DF13 /* SimpleOnDemandSampleTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleOnDemandSampleTableViewController.swift; sourceTree = ""; }; 4CE12DCF1C86147F0049DF13 /* FilteringSampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilteringSampleViewController.swift; sourceTree = ""; }; 4CE12DD21C8614AA0049DF13 /* GroupingSampleTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupingSampleTableViewController.swift; sourceTree = ""; }; @@ -59,7 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C31AF891C74EE9D0094D76F /* XuniCoreKit.framework in Frameworks */, + 4C7CDA901D26E07200F61693 /* XuniCoreKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,7 +90,7 @@ 4C51F81F1C5F4A2600244503 = { isa = PBXGroup; children = ( - 4C31AF881C74EE9D0094D76F /* XuniCoreKit.framework */, + 4C7CDA8F1D26E07200F61693 /* XuniCoreKit.framework */, 4C51F82A1C5F4A2600244503 /* CollectionView101 */, 4C51F8291C5F4A2600244503 /* Products */, ); @@ -333,6 +333,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", + ../../../../../Controls, + "$(PROJECT_DIR)", ../../../Controls, ); INFOPLIST_FILE = CollectionView101/Info.plist; @@ -348,6 +350,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", + ../../../../../Controls, + "$(PROJECT_DIR)", ../../../Controls, ); INFOPLIST_FILE = CollectionView101/Info.plist; diff --git a/Swift/CollectionView101/CollectionView101.xcodeproj/project.xcworkspace/xcuserdata/kotyuck.xcuserdatad/UserInterfaceState.xcuserstate b/Swift/CollectionView101/CollectionView101.xcodeproj/project.xcworkspace/xcuserdata/kotyuck.xcuserdatad/UserInterfaceState.xcuserstate index 65470e1..0d9bdab 100644 Binary files a/Swift/CollectionView101/CollectionView101.xcodeproj/project.xcworkspace/xcuserdata/kotyuck.xcuserdatad/UserInterfaceState.xcuserstate and b/Swift/CollectionView101/CollectionView101.xcodeproj/project.xcworkspace/xcuserdata/kotyuck.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Swift/CollectionView101/CollectionView101/Base.lproj/Localizable.strings b/Swift/CollectionView101/CollectionView101/Base.lproj/Localizable.strings new file mode 100644 index 0000000..79a37c0 --- /dev/null +++ b/Swift/CollectionView101/CollectionView101/Base.lproj/Localizable.strings @@ -0,0 +1,6 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ diff --git a/Swift/CollectionView101/CollectionView101/SortingSampleTableViewController.swift b/Swift/CollectionView101/CollectionView101/SortingSampleTableViewController.swift index 2196740..0cdef1d 100644 --- a/Swift/CollectionView101/CollectionView101/SortingSampleTableViewController.swift +++ b/Swift/CollectionView101/CollectionView101/SortingSampleTableViewController.swift @@ -18,19 +18,19 @@ class SortingSampleTableViewController: UITableViewController { } @IBAction func doSort(sender: AnyObject) { - if (self.sortButton.title == "Sort Z-A") { + if (self.sortButton.title == NSLocalizedString("Sort Z-A", comment: "")) { let sd: XuniSortDescription = XuniSortDescription(property: "title", ascending: false) self.collectionView.sortDescriptions.removeAllObjects() self.collectionView.sortDescriptions.addObject(sd) self.tableView.reloadData() - self.sortButton.title = "Sort A-Z" + self.sortButton.title = NSLocalizedString("Sort A-Z", comment: "") } else { let sd: XuniSortDescription = XuniSortDescription(property: "title", ascending: true) self.collectionView.sortDescriptions.removeAllObjects() self.collectionView.sortDescriptions.addObject(sd) self.tableView.reloadData() - self.sortButton.title = "Sort Z-A" + self.sortButton.title = NSLocalizedString("Sort Z-A", comment: "") } } diff --git a/Swift/CollectionView101/CollectionView101/en.lproj/Localizable.strings b/Swift/CollectionView101/CollectionView101/en.lproj/Localizable.strings new file mode 100644 index 0000000..7f7059a --- /dev/null +++ b/Swift/CollectionView101/CollectionView101/en.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ + +"Sort A-Z" = "Sort A-Z"; + +"Sort Z-A" = "Sort Z-A"; \ No newline at end of file diff --git a/Swift/CollectionView101/CollectionView101/ja.lproj/Localizable.strings b/Swift/CollectionView101/CollectionView101/ja.lproj/Localizable.strings new file mode 100644 index 0000000..00c7da1 --- /dev/null +++ b/Swift/CollectionView101/CollectionView101/ja.lproj/Localizable.strings @@ -0,0 +1,10 @@ +/* + Localizable.strings + CollectionView101 + + Copyright © 2016 GrapeCity. All rights reserved. +*/ + +"Sort A-Z" = "昇順(A-Z)"; + +"Sort Z-A" = "降順(Z-A)"; \ No newline at end of file diff --git a/Swift/CollectionView101/CollectionView101/ja.lproj/Main.strings b/Swift/CollectionView101/CollectionView101/ja.lproj/Main.strings index 17c3950..fbd83be 100644 --- a/Swift/CollectionView101/CollectionView101/ja.lproj/Main.strings +++ b/Swift/CollectionView101/CollectionView101/ja.lproj/Main.strings @@ -3,91 +3,91 @@ "0Wn-El-nmX.text" = ">"; /* Class = "UILabel"; text = "Sorting"; ObjectID = "0ft-v2-ojG"; */ -"0ft-v2-ojG.text" = "Sorting"; +"0ft-v2-ojG.text" = "ソート"; /* Class = "UILabel"; text = "Detail"; ObjectID = "4na-Qg-5gl"; */ -"4na-Qg-5gl.text" = "Detail"; +"4na-Qg-5gl.text" = "詳細"; /* Class = "UILabel"; text = "Displays a grouped list of YouTube videos"; ObjectID = "5gY-WI-I4l"; */ -"5gY-WI-I4l.text" = "Displays a grouped list of YouTube videos"; +"5gY-WI-I4l.text" = "リストをグループ化して表示"; /* Class = "UIViewController"; title = "YouTube OnDemand"; ObjectID = "69x-Gx-Nb6"; */ -"69x-Gx-Nb6.title" = "YouTube OnDemand"; +"69x-Gx-Nb6.title" = "YouTube オンデマンド"; /* Class = "UILabel"; text = "Shows on-demand loading with a ListView"; ObjectID = "6QK-Cc-y15"; */ -"6QK-Cc-y15.text" = "Shows on-demand loading with a ListView"; +"6QK-Cc-y15.text" = "表示時にデータを要求してリストビューに読み込み"; /* Class = "UINavigationController"; title = "CollectionView101"; ObjectID = "798-98-Js3"; */ "798-98-Js3.title" = "CollectionView101"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "7ih-MR-4Cm"; */ -"7ih-MR-4Cm.title" = "Sorting"; +"7ih-MR-4Cm.title" = "ソート"; /* Class = "UITableViewController"; title = "CollectionView101"; ObjectID = "A3s-lV-pdi"; */ "A3s-lV-pdi.title" = "CollectionView101"; /* Class = "UILabel"; text = "Title"; ObjectID = "Anb-IA-gi3"; */ -"Anb-IA-gi3.text" = "Title"; +"Anb-IA-gi3.text" = "タイトル"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "DtY-OV-zVb"; */ -"DtY-OV-zVb.title" = "Back"; +"DtY-OV-zVb.title" = "戻る"; /* Class = "UINavigationItem"; title = "Grouping"; ObjectID = "Eop-Sz-bMd"; */ -"Eop-Sz-bMd.title" = "Grouping"; +"Eop-Sz-bMd.title" = "グループ化"; /* Class = "UINavigationItem"; title = "Filtering Demo"; ObjectID = "F1y-Xk-xGA"; */ -"F1y-Xk-xGA.title" = "Filtering Demo"; +"F1y-Xk-xGA.title" = "フィルター処理"; /* Class = "UILabel"; text = "Simple OnDemand"; ObjectID = "F73-Yk-65J"; */ -"F73-Yk-65J.text" = "Simple OnDemand"; +"F73-Yk-65J.text" = "シンプルオンデマンド"; /* Class = "UITextField"; placeholder = "Enter your search request"; ObjectID = "FzP-fF-yx0"; */ -"FzP-fF-yx0.placeholder" = "Enter your search request"; +"FzP-fF-yx0.placeholder" = "検索するキーワードを入力"; /* Class = "UILabel"; text = "Sort a list of items from the action bar"; ObjectID = "GLZ-02-Gdg"; */ -"GLZ-02-Gdg.text" = "Sort a list of items from the action bar"; +"GLZ-02-Gdg.text" = "アクションバーを操作して項目をソート"; /* Class = "UITableViewController"; title = "Filtering Subview"; ObjectID = "HE6-a9-uUW"; */ -"HE6-a9-uUW.title" = "Filtering Subview"; +"HE6-a9-uUW.title" = "フィルター処理 補助画面"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[0] = "Relevance"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[0]" = "Relevance"; +"IfT-lu-aWn.segmentTitles[0]" = "関連性"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[1] = "Date"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[1]" = "Date"; +"IfT-lu-aWn.segmentTitles[1]" = "日付"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[2] = "View Count"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[2]" = "View Count"; +"IfT-lu-aWn.segmentTitles[2]" = "閲覧数"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[3] = "Rating"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[3]" = "Rating"; +"IfT-lu-aWn.segmentTitles[3]" = "評価"; /* Class = "UISegmentedControl"; IfT-lu-aWn.segmentTitles[4] = "Title"; ObjectID = "IfT-lu-aWn"; */ -"IfT-lu-aWn.segmentTitles[4]" = "Title"; +"IfT-lu-aWn.segmentTitles[4]" = "タイトル"; /* Class = "UILabel"; text = "Detail"; ObjectID = "IpZ-Hb-7b0"; */ -"IpZ-Hb-7b0.text" = "Detail"; +"IpZ-Hb-7b0.text" = "詳細"; /* Class = "UILabel"; text = "Filtering"; ObjectID = "JAY-lX-H0m"; */ -"JAY-lX-H0m.text" = "Filtering"; +"JAY-lX-H0m.text" = "フィルター処理"; /* Class = "UINavigationItem"; title = "Simple OnDemand"; ObjectID = "JXY-hG-Bev"; */ -"JXY-hG-Bev.title" = "Simple OnDemand"; +"JXY-hG-Bev.title" = "シンプルオンデマンド"; /* Class = "UINavigationItem"; title = "Sorting"; ObjectID = "Jcm-u1-tk4"; */ -"Jcm-u1-tk4.title" = "Sorting"; +"Jcm-u1-tk4.title" = "ソート"; /* Class = "UILabel"; text = "Grouping"; ObjectID = "KOu-Xm-dsd"; */ -"KOu-Xm-dsd.text" = "Grouping"; +"KOu-Xm-dsd.text" = "グループ化"; /* Class = "UILabel"; text = ">"; ObjectID = "L4e-gD-TaT"; */ "L4e-gD-TaT.text" = ">"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "PaI-0O-mFv"; */ -"PaI-0O-mFv.title" = "Back"; +"PaI-0O-mFv.title" = "戻る"; /* Class = "UILabel"; text = "Detail"; ObjectID = "S6E-uQ-8gP"; */ -"S6E-uQ-8gP.text" = "Detail"; +"S6E-uQ-8gP.text" = "詳細"; /* Class = "UILabel"; text = ">"; ObjectID = "W5a-cG-S8t"; */ "W5a-cG-S8t.text" = ">"; @@ -96,58 +96,58 @@ "XJb-4a-6I6.text" = ">"; /* Class = "UIViewController"; title = "Filtering Demo"; ObjectID = "ZzD-FA-sPI"; */ -"ZzD-FA-sPI.title" = "Filtering Demo"; +"ZzD-FA-sPI.title" = "フィルター処理"; /* Class = "UILabel"; text = "Shows on-demand loading with YouTube API"; ObjectID = "aEa-i1-YqZ"; */ -"aEa-i1-YqZ.text" = "Shows on-demand loading with YouTube API"; +"aEa-i1-YqZ.text" = "YouTube APIを使用したロードオンデマンド"; /* Class = "UILabel"; text = "Filters a list of items by typing in an Entry"; ObjectID = "ali-Ve-8YO"; */ -"ali-Ve-8YO.text" = "Filters a list of items by typing in an Entry"; +"ali-Ve-8YO.text" = "テキストを入力して項目をフィルタリング"; /* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "amh-J3-5Vm"; */ -"amh-J3-5Vm.title" = "Back"; +"amh-J3-5Vm.title" = "戻る"; /* Class = "UIBarButtonItem"; title = "Sort"; ObjectID = "cDH-85-JES"; */ -"cDH-85-JES.title" = "Sort"; +"cDH-85-JES.title" = "ソート"; /* Class = "UILabel"; text = "Title"; ObjectID = "dnA-mh-F16"; */ -"dnA-mh-F16.text" = "Title"; +"dnA-mh-F16.text" = "タイトル"; /* Class = "UINavigationItem"; title = "CollectionView101"; ObjectID = "fCS-cL-WFr"; */ "fCS-cL-WFr.title" = "CollectionView101"; /* Class = "UILabel"; text = "Detail"; ObjectID = "ia5-D3-eAA"; */ -"ia5-D3-eAA.text" = "Detail"; +"ia5-D3-eAA.text" = "詳細"; /* Class = "UILabel"; text = "Title"; ObjectID = "lkP-cp-Jjv"; */ -"lkP-cp-Jjv.text" = "Title"; +"lkP-cp-Jjv.text" = "タイトル"; /* Class = "UITextField"; placeholder = "Enter your search request"; ObjectID = "m8O-7S-noj"; */ -"m8O-7S-noj.placeholder" = "Enter your search request"; +"m8O-7S-noj.placeholder" = "検索するキーワードを入力"; /* Class = "UILabel"; text = "YouTube OnDemand"; ObjectID = "qaW-JU-eaf"; */ -"qaW-JU-eaf.text" = "YouTube OnDemand"; +"qaW-JU-eaf.text" = "YouTube オンデマンド"; /* Class = "UILabel"; text = "Title"; ObjectID = "rKx-lQ-Ibr"; */ -"rKx-lQ-Ibr.text" = "Title"; +"rKx-lQ-Ibr.text" = "タイトル"; /* Class = "UILabel"; text = "Title"; ObjectID = "sLW-zD-73r"; */ -"sLW-zD-73r.text" = "Title"; +"sLW-zD-73r.text" = "タイトル"; /* Class = "UINavigationItem"; title = "YouTube OnDemand"; ObjectID = "snp-Lp-uik"; */ -"snp-Lp-uik.title" = "YouTube OnDemand"; +"snp-Lp-uik.title" = "YouTube オンデマンド"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "tEM-Ha-q5d"; */ -"tEM-Ha-q5d.title" = "Sorting"; +"tEM-Ha-q5d.title" = "ソート"; /* Class = "UITableViewController"; title = "Grouping"; ObjectID = "ujQ-dv-l4y"; */ -"ujQ-dv-l4y.title" = "Grouping"; +"ujQ-dv-l4y.title" = "グループ化"; /* Class = "UILabel"; text = ">"; ObjectID = "vNr-Nf-FJA"; */ "vNr-Nf-FJA.text" = ">"; /* Class = "UITableViewController"; title = "Sorting"; ObjectID = "wLZ-oO-gNR"; */ -"wLZ-oO-gNR.title" = "Sorting"; +"wLZ-oO-gNR.title" = "ソート"; /* Class = "UILabel"; text = "Detail"; ObjectID = "yLd-8q-2dX"; */ -"yLd-8q-2dX.text" = "Detail"; +"yLd-8q-2dX.text" = "詳細"; diff --git a/Swift/FlexChart101/FlexChart101.xcodeproj/project.pbxproj b/Swift/FlexChart101/FlexChart101.xcodeproj/project.pbxproj index f70ba0d..65eceda 100644 --- a/Swift/FlexChart101/FlexChart101.xcodeproj/project.pbxproj +++ b/Swift/FlexChart101/FlexChart101.xcodeproj/project.pbxproj @@ -7,17 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 8407E6921BA170B3001C1582 /* LineMarkerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8407E6911BA170B3001C1582 /* LineMarkerController.swift */; }; - 8435C94B1C86ACB6001AC90E /* ChartAnnotationsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8435C94A1C86ACB6001AC90E /* ChartAnnotationsController.swift */; }; - 8456E5891C7D41B7007DBBC9 /* XuniChartCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E5861C7D41B7007DBBC9 /* XuniChartCoreKit.framework */; }; - 8456E58A1C7D41B7007DBBC9 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E5871C7D41B7007DBBC9 /* XuniCoreKit.framework */; }; - 8456E58B1C7D41B7007DBBC9 /* XuniFlexChartKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8456E5881C7D41B7007DBBC9 /* XuniFlexChartKit.framework */; }; - 84D2E7A01C03043800D46662 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84D2E7A21C03043800D46662 /* Localizable.strings */; }; - 84D4F3161BCCB08D000B5960 /* ConditionalFormattingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.swift */; }; - 84D4F3171BCCB08D000B5960 /* CustomPlotElementsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.swift */; }; - 84D4F3201BCF89A1000B5960 /* ScrollingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D4F31F1BCF89A1000B5960 /* ScrollingController.swift */; }; - 84E33AB91B8D6BF4002AE146 /* UpdateAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.swift */; }; - F2160FD71B18EC0E00F3ADD5 /* LoadAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2160FD61B18EC0E00F3ADD5 /* LoadAnimationController.swift */; }; + 8497208B1C63496B001F538B /* ChartAnnotationsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8497208A1C63496B001F538B /* ChartAnnotationsController.swift */; }; + 84D2BA071BDDD4DA00EDD0F9 /* LineMarkerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA061BDDD4DA00EDD0F9 /* LineMarkerController.swift */; }; + 84D2BA091BDF14A100EDD0F9 /* ConditionalFormattingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA081BDF14A100EDD0F9 /* ConditionalFormattingController.swift */; }; + 84D2BA0B1BDF255900EDD0F9 /* CustomPlotElementsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA0A1BDF255900EDD0F9 /* CustomPlotElementsController.swift */; }; + 84D2BA111BE077B900EDD0F9 /* LoadAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA101BE077B900EDD0F9 /* LoadAnimationController.swift */; }; + 84D2BA131BE07C0000EDD0F9 /* UpdateAnimationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA121BE07C0000EDD0F9 /* UpdateAnimationController.swift */; }; + 84D2BA171BE0BFB200EDD0F9 /* ScrollingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D2BA161BE0BFB200EDD0F9 /* ScrollingController.swift */; }; + ED2F25431D07E5560083217E /* XuniChartCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2F25401D07E5560083217E /* XuniChartCoreKit.framework */; }; + ED2F25441D07E5560083217E /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2F25411D07E5560083217E /* XuniCoreKit.framework */; }; + ED2F25451D07E5560083217E /* XuniFlexChartKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2F25421D07E5560083217E /* XuniFlexChartKit.framework */; }; F273C2101B45D38000958473 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C20F1B45D38000958473 /* AppDelegate.swift */; }; F273C2121B45D38000958473 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C2111B45D38000958473 /* ViewController.swift */; }; F273C2151B45D38000958473 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F273C2131B45D38000958473 /* Main.storyboard */; }; @@ -61,21 +60,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 8407E6911BA170B3001C1582 /* LineMarkerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineMarkerController.swift; sourceTree = ""; }; - 8435C94A1C86ACB6001AC90E /* ChartAnnotationsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartAnnotationsController.swift; sourceTree = ""; }; - 8456E5861C7D41B7007DBBC9 /* XuniChartCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreKit.framework; path = "../../../ObjectiveC/DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniChartCoreKit.framework"; sourceTree = ""; }; - 8456E5871C7D41B7007DBBC9 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../ObjectiveC/DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniCoreKit.framework"; sourceTree = ""; }; - 8456E5881C7D41B7007DBBC9 /* XuniFlexChartKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexChartKit.framework; path = "../../../ObjectiveC/DerivedData/FlexChartWorkspace/Build/Products/Debug-framework/XuniFlexChartKit.framework"; sourceTree = ""; }; - 84D2E79C1C0303D500D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; - 84D2E79D1C0303D500D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - 84D2E7A11C03043800D46662 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; - 84D2E7A31C03043B00D46662 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 84D2E7A41C03043C00D46662 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; - 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalFormattingController.swift; sourceTree = ""; }; - 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomPlotElementsController.swift; sourceTree = ""; }; - 84D4F31F1BCF89A1000B5960 /* ScrollingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollingController.swift; sourceTree = ""; }; - 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateAnimationController.swift; sourceTree = ""; }; - F2160FD61B18EC0E00F3ADD5 /* LoadAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadAnimationController.swift; sourceTree = ""; }; + 8497208A1C63496B001F538B /* ChartAnnotationsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartAnnotationsController.swift; sourceTree = ""; }; + 84D2BA061BDDD4DA00EDD0F9 /* LineMarkerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineMarkerController.swift; sourceTree = ""; }; + 84D2BA081BDF14A100EDD0F9 /* ConditionalFormattingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalFormattingController.swift; sourceTree = ""; }; + 84D2BA0A1BDF255900EDD0F9 /* CustomPlotElementsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomPlotElementsController.swift; sourceTree = ""; }; + 84D2BA101BE077B900EDD0F9 /* LoadAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadAnimationController.swift; sourceTree = ""; }; + 84D2BA121BE07C0000EDD0F9 /* UpdateAnimationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateAnimationController.swift; sourceTree = ""; }; + 84D2BA161BE0BFB200EDD0F9 /* ScrollingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollingController.swift; sourceTree = ""; }; + ED2F25401D07E5560083217E /* XuniChartCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniChartCoreKit.framework; path = ../../../Controls/XuniChartCoreKit.framework; sourceTree = ""; }; + ED2F25411D07E5560083217E /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = ../../../Controls/XuniCoreKit.framework; sourceTree = ""; }; + ED2F25421D07E5560083217E /* XuniFlexChartKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexChartKit.framework; path = ../../../Controls/XuniFlexChartKit.framework; sourceTree = ""; }; F273C20A1B45D38000958473 /* FlexChart101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlexChart101.app; sourceTree = BUILT_PRODUCTS_DIR; }; F273C20E1B45D38000958473 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F273C20F1B45D38000958473 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -117,9 +111,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8456E5891C7D41B7007DBBC9 /* XuniChartCoreKit.framework in Frameworks */, - 8456E58A1C7D41B7007DBBC9 /* XuniCoreKit.framework in Frameworks */, - 8456E58B1C7D41B7007DBBC9 /* XuniFlexChartKit.framework in Frameworks */, + ED2F25431D07E5560083217E /* XuniChartCoreKit.framework in Frameworks */, + ED2F25441D07E5560083217E /* XuniCoreKit.framework in Frameworks */, + ED2F25451D07E5560083217E /* XuniFlexChartKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -136,9 +130,9 @@ F273C2011B45D38000958473 = { isa = PBXGroup; children = ( - 8456E5861C7D41B7007DBBC9 /* XuniChartCoreKit.framework */, - 8456E5871C7D41B7007DBBC9 /* XuniCoreKit.framework */, - 8456E5881C7D41B7007DBBC9 /* XuniFlexChartKit.framework */, + ED2F25401D07E5560083217E /* XuniChartCoreKit.framework */, + ED2F25411D07E5560083217E /* XuniCoreKit.framework */, + ED2F25421D07E5560083217E /* XuniFlexChartKit.framework */, F273C20C1B45D38000958473 /* FlexChart101 */, F273C2221B45D38000958473 /* FlexChart101Tests */, F273C20B1B45D38000958473 /* Products */, @@ -160,11 +154,11 @@ F273C20F1B45D38000958473 /* AppDelegate.swift */, F273C2311B45D66100958473 /* BasicChartTypesController.swift */, F273C2371B45D69A00958473 /* BubbleChartController.swift */, - 8435C94A1C86ACB6001AC90E /* ChartAnnotationsController.swift */, + 8497208A1C63496B001F538B /* ChartAnnotationsController.swift */, F273C2551B45D7DF00958473 /* ChartData.swift */, - 84D4F3131BCCB08D000B5960 /* ConditionalFormattingController.swift */, + 84D2BA081BDF14A100EDD0F9 /* ConditionalFormattingController.swift */, F273C23F1B45D6E000958473 /* CustomizingAxesController.swift */, - 84D4F3151BCCB08D000B5960 /* CustomPlotElementsController.swift */, + 84D2BA0A1BDF255900EDD0F9 /* CustomPlotElementsController.swift */, F273C2391B45D6AE00958473 /* CustomTooltipsController.swift */, F2BEDB9F1B73E6BE00DD2454 /* DataLabelController.swift */, F273C25B1B45D81700958473 /* DynamicChartData.swift */, @@ -178,19 +172,19 @@ F273C2181B45D38000958473 /* LaunchScreen.xib */, F273C2431B45D71B00958473 /* LegendAndTitlesController.swift */, F273C25F1B45D83400958473 /* License.swift */, - 8407E6911BA170B3001C1582 /* LineMarkerController.swift */, - F2160FD61B18EC0E00F3ADD5 /* LoadAnimationController.swift */, + 84D2BA061BDDD4DA00EDD0F9 /* LineMarkerController.swift */, + 84D2BA101BE077B900EDD0F9 /* LoadAnimationController.swift */, F273C2131B45D38000958473 /* Main.storyboard */, F273C2331B45D67300958473 /* MixedChartTypesController.swift */, F273C2531B45D7C700958473 /* MultipleAxesController.swift */, - 84D4F31F1BCF89A1000B5960 /* ScrollingController.swift */, + 84D2BA161BE0BFB200EDD0F9 /* ScrollingController.swift */, F273C2451B45D72D00958473 /* SelectionModesController.swift */, F273C2511B45D7AF00958473 /* SnapshotController.swift */, F273C23D1B45D6CF00958473 /* StylingSeriesController.swift */, F273C20D1B45D38000958473 /* Supporting Files */, F273C23B1B45D6BD00958473 /* ThemingController.swift */, F273C2471B45D73E00958473 /* TogglesSeriesController.swift */, - 84E33AB81B8D6BF4002AE146 /* UpdateAnimationController.swift */, + 84D2BA121BE07C0000EDD0F9 /* UpdateAnimationController.swift */, F273C2111B45D38000958473 /* ViewController.swift */, F273C25D1B45D82900958473 /* WeatherData.swift */, F273C24D1B45D77C00958473 /* ZoomingAndScrollingController.swift */, @@ -202,7 +196,6 @@ isa = PBXGroup; children = ( F273C20E1B45D38000958473 /* Info.plist */, - 84D2E7A21C03043800D46662 /* Localizable.strings */, ); name = "Supporting Files"; sourceTree = ""; @@ -288,7 +281,6 @@ knownRegions = ( en, Base, - ja, ); mainGroup = F273C2011B45D38000958473; productRefGroup = F273C20B1B45D38000958473 /* Products */; @@ -307,7 +299,6 @@ buildActionMask = 2147483647; files = ( F273C2151B45D38000958473 /* Main.storyboard in Resources */, - 84D2E7A01C03043800D46662 /* Localizable.strings in Resources */, F273C21A1B45D38000958473 /* LaunchScreen.xib in Resources */, F273C2171B45D38000958473 /* Images.xcassets in Resources */, ); @@ -327,22 +318,18 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 84D4F3161BCCB08D000B5960 /* ConditionalFormattingController.swift in Sources */, - 84D4F3171BCCB08D000B5960 /* CustomPlotElementsController.swift in Sources */, - 84D4F3201BCF89A1000B5960 /* ScrollingController.swift in Sources */, - 8407E6921BA170B3001C1582 /* LineMarkerController.swift in Sources */, F273C2361B45D68900958473 /* FinancialChartController.swift in Sources */, + 84D2BA131BE07C0000EDD0F9 /* UpdateAnimationController.swift in Sources */, F273C2441B45D71B00958473 /* LegendAndTitlesController.swift in Sources */, F2BEDBA01B73E6BE00DD2454 /* DataLabelController.swift in Sources */, F273C2301B45D65000958473 /* GettingStartedController.swift in Sources */, - 84E33AB91B8D6BF4002AE146 /* UpdateAnimationController.swift in Sources */, - F2160FD71B18EC0E00F3ADD5 /* LoadAnimationController.swift in Sources */, + 84D2BA171BE0BFB200EDD0F9 /* ScrollingController.swift in Sources */, F273C2601B45D83400958473 /* License.swift in Sources */, - 8435C94B1C86ACB6001AC90E /* ChartAnnotationsController.swift in Sources */, F273C2561B45D7DF00958473 /* ChartData.swift in Sources */, F273C2121B45D38000958473 /* ViewController.swift in Sources */, F273C25E1B45D82900958473 /* WeatherData.swift in Sources */, F273C2401B45D6E000958473 /* CustomizingAxesController.swift in Sources */, + 8497208B1C63496B001F538B /* ChartAnnotationsController.swift in Sources */, F273C24C1B45D76400958473 /* DynamicChartsController.swift in Sources */, F273C23C1B45D6BD00958473 /* ThemingController.swift in Sources */, F273C2541B45D7C700958473 /* MultipleAxesController.swift in Sources */, @@ -355,11 +342,15 @@ F273C2501B45D79200958473 /* HitTestController.swift in Sources */, F273C2521B45D7AF00958473 /* SnapshotController.swift in Sources */, F273C25C1B45D81700958473 /* DynamicChartData.swift in Sources */, + 84D2BA0B1BDF255900EDD0F9 /* CustomPlotElementsController.swift in Sources */, F273C2101B45D38000958473 /* AppDelegate.swift in Sources */, F273C24E1B45D77C00958473 /* ZoomingAndScrollingController.swift in Sources */, F273C25A1B45D80200958473 /* HitTestData.swift in Sources */, F273C23A1B45D6AE00958473 /* CustomTooltipsController.swift in Sources */, + 84D2BA091BDF14A100EDD0F9 /* ConditionalFormattingController.swift in Sources */, F273C2321B45D66100958473 /* BasicChartTypesController.swift in Sources */, + 84D2BA071BDDD4DA00EDD0F9 /* LineMarkerController.swift in Sources */, + 84D2BA111BE077B900EDD0F9 /* LoadAnimationController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -382,21 +373,10 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 84D2E7A21C03043800D46662 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 84D2E7A11C03043800D46662 /* Base */, - 84D2E7A31C03043B00D46662 /* en */, - 84D2E7A41C03043C00D46662 /* ja */, - ); - name = Localizable.strings; - sourceTree = ""; - }; F273C2131B45D38000958473 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( F273C2141B45D38000958473 /* Base */, - 84D2E79D1C0303D500D46662 /* ja */, ); name = Main.storyboard; sourceTree = ""; @@ -405,7 +385,6 @@ isa = PBXVariantGroup; children = ( F273C2191B45D38000958473 /* Base */, - 84D2E79C1C0303D500D46662 /* ja */, ); name = LaunchScreen.xib; sourceTree = ""; @@ -434,6 +413,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "/Users/kotyuck/Desktop/Volumes/main-frameworks"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -480,6 +460,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "/Users/kotyuck/Desktop/Volumes/main-frameworks"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -501,12 +482,8 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - ../../../Controls, - ); + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexChart101/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -517,12 +494,8 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - ../../../Controls, - ); + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexChart101/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/Swift/FlexChart101/FlexChart101/Base.lproj/Main.storyboard b/Swift/FlexChart101/FlexChart101/Base.lproj/Main.storyboard index dc81b79..78d3f26 100644 --- a/Swift/FlexChart101/FlexChart101/Base.lproj/Main.storyboard +++ b/Swift/FlexChart101/FlexChart101/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + diff --git a/Swift/FlexChart101/FlexChart101/ChartData.swift b/Swift/FlexChart101/FlexChart101/ChartData.swift index 46c3beb..4a175a8 100644 --- a/Swift/FlexChart101/FlexChart101/ChartData.swift +++ b/Swift/FlexChart101/FlexChart101/ChartData.swift @@ -85,4 +85,16 @@ class ChartPoint : NSObject { return points } + + class func generateRandomData(count: Int) -> NSMutableArray { + let points = NSMutableArray() + + + for var i = 0; i < count; i++ { + var random :Double = (Double)(arc4random()%10000) + 100.0 + points.addObject(ChartPoint.init(x: (Double)(i*10), y: random)) + } + + return points + } } diff --git a/Swift/FlexChart101/FlexChart101/ConditionalFormattingController.swift b/Swift/FlexChart101/FlexChart101/ConditionalFormattingController.swift index a8f3455..497f43b 100644 --- a/Swift/FlexChart101/FlexChart101/ConditionalFormattingController.swift +++ b/Swift/FlexChart101/FlexChart101/ConditionalFormattingController.swift @@ -28,19 +28,19 @@ class ConditionalFormattingController: UIViewController { _chart.axisY.format = "F1" _chart.axisX.format = "F1" - func plotElementLoadingHandler(sender: NSObject!, args: XuniEventArgs!) { - var plotArgs = args as! XuniChartPlotElementEventArgs + func plotElementLoadingHandler(args: XuniEventContainer!) { + let plotArgs = args.eventArgs as! XuniChartPlotElementEventArgs if plotArgs.dataPoint != nil && plotArgs.defaultRender != nil { - var y = plotArgs.dataPoint.value; + let y = plotArgs.dataPoint.value; // change color values based on y-axis values - var r = (y >= 0 ? 1 : ((1 + y))) - var b = (y < 0 ? 1 : ((1 - y))) - var g = (1 - fabs(y)) - var a = 0.8 + let r = (y >= 0 ? 1 : ((1 + y))) + let b = (y < 0 ? 1 : ((1 - y))) + let g = (1 - fabs(y)) + let a = 0.8 (plotArgs.renderEngine as! XuniRenderEngine).setFill(UIColor(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b), alpha: CGFloat(a))) - (plotArgs.defaultRender as! IXuniFunction).execute(nil) + plotArgs.defaultRender.execute() } } _chart.plotElementLoading.addHandler(plotElementLoadingHandler, forObject: self) @@ -59,7 +59,7 @@ class ConditionalFormattingController: UIViewController { } func getData() -> NSMutableArray { - var array = NSMutableArray() + let array = NSMutableArray() for var i = 0; i < 30; i++ { array.addObject(ChartPoint(x: (0.16 * Double(i)), y: cos(0.12 * Double(i)))) diff --git a/Swift/FlexChart101/FlexChart101/CustomPlotElementsController.swift b/Swift/FlexChart101/FlexChart101/CustomPlotElementsController.swift index aa1db66..19dc7c4 100644 --- a/Swift/FlexChart101/FlexChart101/CustomPlotElementsController.swift +++ b/Swift/FlexChart101/FlexChart101/CustomPlotElementsController.swift @@ -31,20 +31,21 @@ class CustomPlotElementsController: UIViewController { _chart.axisX.majorTickWidth = 0 _chart.axisX.minorTickWidth = 1 - func plotElementLoadingHandler(sender: NSObject!, args: XuniEventArgs!) { - var plotArgs = args as! XuniChartPlotElementEventArgs + func plotElementLoadingHandler(args: XuniEventContainer!) { + let plotArgs = args.eventArgs as! XuniChartPlotElementEventArgs if plotArgs.renderEngine != nil && plotArgs.hitTestInfo != nil && plotArgs.defaultRender != nil { (plotArgs.renderEngine as! XuniRenderEngine).setFill(UIColor.grayColor()) - (plotArgs.defaultRender as! IXuniFunction).execute(nil) + plotArgs.defaultRender.execute() var rect = (plotArgs.defaultRender as! DefaultBarElementRender).getBarRect() - var customPoint: CustomPoint = _chart.itemsSource.objectAtIndex(Int(plotArgs.dataPoint.pointIndex)) as! CustomPoint + let customPoint: CustomPoint = _chart.itemsSource.objectAtIndex(Int(plotArgs.dataPoint.pointIndex)) as! CustomPoint rect.origin.y += (rect.size.height - rect.size.width) / 2; rect.size.height = rect.size.width; customPoint.logo.drawInRect(rect) } } _chart.plotElementLoading.addHandler(plotElementLoadingHandler, forObject: self) + self.view.addSubview(_chart) } diff --git a/Swift/FlexChart101/FlexChart101/CustomizingAxesController.swift b/Swift/FlexChart101/FlexChart101/CustomizingAxesController.swift index 0dc654a..59468e7 100644 --- a/Swift/FlexChart101/FlexChart101/CustomizingAxesController.swift +++ b/Swift/FlexChart101/FlexChart101/CustomizingAxesController.swift @@ -26,17 +26,17 @@ class CustomizingAxesController: UIViewController { _chart.itemsSource = ChartData.demoData() _chart.bindingX = "name" _chart.axisX.title = "Country" - _chart.axisX.lineWidth = 2; - _chart.axisX.minorTickWidth = 1; - _chart.axisX.majorTickWidth = 0; + _chart.axisX.lineWidth = 2 + _chart.axisX.minorTickWidth = 1 + _chart.axisX.majorTickWidth = 0 _chart.axisY.lineWidth = 2 - _chart.axisY.minorGridVisible = true; - _chart.axisY.minorGridWidth = 0.5; - _chart.axisY.minorGridDashes = NSArray(array: [4, 4]) as [AnyObject] - _chart.axisY.minorTickWidth = 1; - _chart.axisY.majorTickWidth = 2; - _chart.axisY.majorGridWidth = 1; + _chart.axisY.minorGridVisible = true + _chart.axisY.minorGridWidth = 0.5 + _chart.axisY.minorGridDashes = NSArray(array: [4, 4]) as! [NSNumber] + _chart.axisY.minorTickWidth = 1 + _chart.axisY.majorTickWidth = 2 + _chart.axisY.majorGridWidth = 1 _chart.axisY.majorGridColor = UIColor(white: 0.8, alpha: 1) _chart.axisY.majorGridFill = UIColor(white: 0.6, alpha: 0.2) @@ -44,19 +44,19 @@ class CustomizingAxesController: UIViewController { _chart.axisY.majorUnit = 1000 _chart.axisY.max = 10000 - func axisXLabelLoadingHandler(sender: NSObject!, args: XuniEventArgs!) { - var labelArgs = args as! XuniLabelLoadingEventArgs + func axisXLabelLoadingHandler(args: XuniEventContainer!) { + let labelArgs = args.eventArgs as! XuniLabelLoadingEventArgs labelArgs.label = nil - var image = UIImage(named:"\(labelArgs.value)")! - var rect = CGRectMake (CGFloat(labelArgs.region.left), CGFloat(labelArgs.region.top), CGFloat(labelArgs.region.width), CGFloat(labelArgs.region.height)) + let image = UIImage(named:"\(labelArgs.value)")! + let rect = CGRectMake (CGFloat(labelArgs.region.left), CGFloat(labelArgs.region.top), CGFloat(labelArgs.region.width), CGFloat(labelArgs.region.height)) image.drawInRect(rect) } _chart.axisX.labelLoading.addHandler(axisXLabelLoadingHandler, forObject: self) - func axisYLabelLoadingHandler(sender: NSObject!, args: XuniEventArgs!) { - var labelArgs = args as! XuniLabelLoadingEventArgs - var renderEngine = labelArgs.renderEngine as! XuniRenderEngine + func axisYLabelLoadingHandler(args: XuniEventContainer!) { + let labelArgs = args.eventArgs as! XuniLabelLoadingEventArgs + let renderEngine = labelArgs.renderEngine as! XuniRenderEngine if (labelArgs.value <= 3000) { renderEngine.setTextFill(UIColor.redColor()) diff --git a/Swift/FlexChart101/FlexChart101/HitTestController.swift b/Swift/FlexChart101/FlexChart101/HitTestController.swift index 7b0d967..a78baa3 100644 --- a/Swift/FlexChart101/FlexChart101/HitTestController.swift +++ b/Swift/FlexChart101/FlexChart101/HitTestController.swift @@ -64,8 +64,8 @@ class HitTestController: UIViewController, FlexChartDelegate { _chartElementLabel.frame = CGRectMake(0, self.view.bounds.size.height * 6 / 8, self.view.bounds.size.width, self.view.bounds.size.height / 16) } - func tapped(sender: FlexChartBase!, point: XuniPoint!) -> Bool { - var hitTest = _chart.hitTest(point) + func tapped(sender: XuniView!, point: XuniPoint!) -> Bool { + let hitTest = _chart.hitTest(point) var seriesName = ""; if (hitTest.dataPoint.seriesIndex >= 0 && hitTest.dataPoint.seriesIndex < Int32(_chart.series.count)) { seriesName = hitTest.dataPoint.seriesName; diff --git a/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json b/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json new file mode 100644 index 0000000..05e7047 --- /dev/null +++ b/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "chart_line.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png b/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png new file mode 100644 index 0000000..8a848e7 Binary files /dev/null and b/Swift/FlexChart101/FlexChart101/Images.xcassets/chartscaling.imageset/chart_line.png differ diff --git a/Swift/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings b/Swift/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings index 4d45781..4abc5fa 100644 --- a/Swift/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings +++ b/Swift/FlexChart101/FlexChart101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ /* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +"8ie-xW-0ye.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; /* Class = "UILabel"; text = "FlexChart101"; ObjectID = "kId-c2-rCX"; */ "kId-c2-rCX.text" = "FlexChart101"; diff --git a/Swift/FlexChart101/FlexChart101/ja.lproj/Localizable.strings b/Swift/FlexChart101/FlexChart101/ja.lproj/Localizable.strings index 73e1c6f..877be1d 100644 --- a/Swift/FlexChart101/FlexChart101/ja.lproj/Localizable.strings +++ b/Swift/FlexChart101/FlexChart101/ja.lproj/Localizable.strings @@ -55,6 +55,9 @@ "Export Image" = "画像として保存"; +"Annotations" = "チャートの注釈"; + + // Samples Description "Shows a simple chart with tooltips." = "ツールチップを備えたチャート"; @@ -105,6 +108,8 @@ "Shows how to export an image of FlexChart." = "チャートを画像として保存する方法"; +"Shows how to display annotations on FlexChart." = "チャートに各種形状の注釈を表示する方法"; + // Strings "Add Point" = "データ点の追加"; diff --git a/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj b/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj index 578968a..866ef82 100644 --- a/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj +++ b/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.pbxproj @@ -7,136 +7,171 @@ objects = { /* Begin PBXBuildFile section */ - 4C0AC1491C07C27800E3BA6F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C0AC14B1C07C27800E3BA6F /* Localizable.strings */; }; - 4C12C95C1C92C4E400F45F92 /* filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C94D1C92C4E400F45F92 /* filter.png */; }; - 4C12C95D1C92C4E400F45F92 /* flexgrid_columns.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C94E1C92C4E400F45F92 /* flexgrid_columns.png */; }; - 4C12C95E1C92C4E400F45F92 /* flexgrid_custom.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C94F1C92C4E400F45F92 /* flexgrid_custom.png */; }; - 4C12C95F1C92C4E400F45F92 /* flexgrid_filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9501C92C4E400F45F92 /* flexgrid_filter.png */; }; - 4C12C9601C92C4E400F45F92 /* flexgrid_freezing.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9511C92C4E400F45F92 /* flexgrid_freezing.png */; }; - 4C12C9611C92C4E400F45F92 /* flexgrid_grouping.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9521C92C4E400F45F92 /* flexgrid_grouping.png */; }; - 4C12C9621C92C4E400F45F92 /* flexgrid_loading.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9531C92C4E400F45F92 /* flexgrid_loading.png */; }; - 4C12C9631C92C4E400F45F92 /* flexgrid_merging.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9541C92C4E400F45F92 /* flexgrid_merging.png */; }; - 4C12C9641C92C4E400F45F92 /* flexgrid_rowdetails.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9551C92C4E400F45F92 /* flexgrid_rowdetails.png */; }; - 4C12C9651C92C4E400F45F92 /* flexgrid_selection.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9561C92C4E400F45F92 /* flexgrid_selection.png */; }; - 4C12C9661C92C4E400F45F92 /* flexgrid.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9571C92C4E400F45F92 /* flexgrid.png */; }; - 4C12C9671C92C4E400F45F92 /* hide.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9581C92C4E400F45F92 /* hide.png */; }; - 4C12C9681C92C4E400F45F92 /* input_form.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C9591C92C4E400F45F92 /* input_form.png */; }; - 4C12C9691C92C4E400F45F92 /* retro_TV_filled-50_light.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C95A1C92C4E400F45F92 /* retro_TV_filled-50_light.png */; }; - 4C12C96A1C92C4E400F45F92 /* show.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C12C95B1C92C4E400F45F92 /* show.png */; }; - 4C12C96C1C92C8B500F45F92 /* RowDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C12C96B1C92C8B500F45F92 /* RowDetailsViewController.swift */; }; - 4C12C96E1C92C9F300F45F92 /* CustomMergingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C12C96D1C92C9F300F45F92 /* CustomMergingViewController.swift */; }; - 4C3C7B2D1C049EF500D2655C /* ColumnLayoutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C7B281C049EF500D2655C /* ColumnLayoutController.swift */; }; - 4C3C7B2E1C049EF500D2655C /* ColumnReordererTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C7B291C049EF500D2655C /* ColumnReordererTableViewController.swift */; }; - 4C3C7B2F1C049EF500D2655C /* CustomerObjectEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C7B2A1C049EF500D2655C /* CustomerObjectEditor.swift */; }; - 4C3C7B301C049EF500D2655C /* EditingFormController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C7B2B1C049EF500D2655C /* EditingFormController.swift */; }; - 4C3C7B311C049EF500D2655C /* OnDemandController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3C7B2C1C049EF500D2655C /* OnDemandController.swift */; }; - 4C435C9E1BD563180099A651 /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C435C9B1BD563180099A651 /* XuniCoreKit.framework */; }; - 4C435C9F1BD563180099A651 /* XuniFlexGridKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C435C9C1BD563180099A651 /* XuniFlexGridKit.framework */; }; - 4C435CA01BD563180099A651 /* XuniGaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C435C9D1BD563180099A651 /* XuniGaugeKit.framework */; }; - 4C435CA71BD7C2410099A651 /* StarSizingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CA61BD7C2410099A651 /* StarSizingController.swift */; }; - 4C435CAC1BD804F80099A651 /* FrozenCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CAB1BD804F80099A651 /* FrozenCellsController.swift */; }; - 4C435CB91BD8D10B0099A651 /* ConditionalFormattingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CB81BD8D10B0099A651 /* ConditionalFormattingController.swift */; }; - F229417D1B504196007703FD /* SharedFilterData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F229417C1B504196007703FD /* SharedFilterData.swift */; }; - F23675D01B592C9B00194040 /* EditConfirmationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F23675CF1B592C9B00194040 /* EditConfirmationController.swift */; }; - F273C1C81B45C40A00958473 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1C71B45C40A00958473 /* AppDelegate.swift */; }; - F273C1CA1B45C40A00958473 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1C91B45C40A00958473 /* ViewController.swift */; }; - F273C1CD1B45C40A00958473 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F273C1CB1B45C40A00958473 /* Main.storyboard */; }; - F273C1CF1B45C40A00958473 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F273C1CE1B45C40A00958473 /* Images.xcassets */; }; - F273C1D21B45C40A00958473 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F273C1D01B45C40A00958473 /* LaunchScreen.xib */; }; - F273C1DE1B45C40A00958473 /* FlexGrid101Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1DD1B45C40A00958473 /* FlexGrid101Tests.swift */; }; - F273C1E81B45C7BA00958473 /* GettingStartedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1E71B45C7BA00958473 /* GettingStartedController.swift */; }; - F273C1EA1B45CA7C00958473 /* ColumnDefinitionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1E91B45CA7C00958473 /* ColumnDefinitionController.swift */; }; - F273C1EC1B45CAA900958473 /* SelectionModesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1EB1B45CAA900958473 /* SelectionModesController.swift */; }; - F273C1EE1B45CAC400958473 /* CustomCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1ED1B45CAC400958473 /* CustomCellsController.swift */; }; - F273C1F01B45CAD500958473 /* GroupingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1EF1B45CAD500958473 /* GroupingController.swift */; }; - F273C1F21B45CAE400958473 /* FilterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1F11B45CAE400958473 /* FilterController.swift */; }; - F273C1F41B45CAFD00958473 /* FullTextFilterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1F31B45CAFD00958473 /* FullTextFilterController.swift */; }; - F273C1F61B45CB1900958473 /* EditingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1F51B45CB1900958473 /* EditingController.swift */; }; - F273C1F81B45CB3100958473 /* FilterFormController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1F71B45CB3100958473 /* FilterFormController.swift */; }; - F273C1FA1B45CB5B00958473 /* CustomerData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1F91B45CB5B00958473 /* CustomerData.swift */; }; - F273C1FC1B45CB7A00958473 /* License.swift in Sources */ = {isa = PBXBuildFile; fileRef = F273C1FB1B45CB7A00958473 /* License.swift */; }; + 4C06B2CB1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */; }; + 4C06B2CC1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C06B2CD1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */; }; + 4C06B2CE1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C06B2CF1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */; }; + 4C06B2D01D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4C1C57061D26DED3007491EB /* flexgrid_headers.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C1C57051D26DED3007491EB /* flexgrid_headers.png */; }; + 4C219E801C91B3240089B6B0 /* filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E711C91B3240089B6B0 /* filter.png */; }; + 4C219E811C91B3240089B6B0 /* flexgrid_columns.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */; }; + 4C219E821C91B3240089B6B0 /* flexgrid_custom.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */; }; + 4C219E831C91B3240089B6B0 /* flexgrid_filter.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E741C91B3240089B6B0 /* flexgrid_filter.png */; }; + 4C219E841C91B3240089B6B0 /* flexgrid_freezing.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E751C91B3240089B6B0 /* flexgrid_freezing.png */; }; + 4C219E851C91B3240089B6B0 /* flexgrid_grouping.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E761C91B3240089B6B0 /* flexgrid_grouping.png */; }; + 4C219E861C91B3240089B6B0 /* flexgrid_loading.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E771C91B3240089B6B0 /* flexgrid_loading.png */; }; + 4C219E871C91B3240089B6B0 /* flexgrid_merging.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E781C91B3240089B6B0 /* flexgrid_merging.png */; }; + 4C219E881C91B3240089B6B0 /* flexgrid_rowdetails.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E791C91B3240089B6B0 /* flexgrid_rowdetails.png */; }; + 4C219E891C91B3240089B6B0 /* flexgrid_selection.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7A1C91B3240089B6B0 /* flexgrid_selection.png */; }; + 4C219E8A1C91B3240089B6B0 /* flexgrid.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7B1C91B3240089B6B0 /* flexgrid.png */; }; + 4C219E8B1C91B3240089B6B0 /* hide.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7C1C91B3240089B6B0 /* hide.png */; }; + 4C219E8C1C91B3240089B6B0 /* input_form.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7D1C91B3240089B6B0 /* input_form.png */; }; + 4C219E8D1C91B3240089B6B0 /* retro_TV_filled-50_light.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7E1C91B3240089B6B0 /* retro_TV_filled-50_light.png */; }; + 4C219E8E1C91B3240089B6B0 /* show.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C219E7F1C91B3240089B6B0 /* show.png */; }; + 4C219E921C91C3FD0089B6B0 /* RowDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C219E911C91C3FD0089B6B0 /* RowDetailsViewController.swift */; }; + 4C219E981C91C90D0089B6B0 /* CustomMergingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C219E971C91C90D0089B6B0 /* CustomMergingViewController.swift */; }; + 4C26BAAA1D1305AA00F65D77 /* UnboundSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.swift */; }; + 4C393DCF1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.swift */; }; + 4C393DD21D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.swift */; }; + 4C393DD31D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.swift */; }; + 4C41F60E1BDE854900D3F97A /* OnDemandController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C41F60D1BDE854900D3F97A /* OnDemandController.swift */; }; + 4C435CA51BD7AA1E0099A651 /* StarSizingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CA41BD7AA1D0099A651 /* StarSizingController.swift */; }; + 4C435CAA1BD7FD930099A651 /* FrozenCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CA91BD7FD930099A651 /* FrozenCellsController.swift */; }; + 4C435CB11BD8C5F20099A651 /* ConditionalFormattingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.swift */; }; + 4C435CBC1BD8D92B0099A651 /* EditingFormController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C435CBB1BD8D92B0099A651 /* EditingFormController.swift */; }; + 4C58D0581CAC305100A6DF33 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C58D0571CAC305100A6DF33 /* MapKit.framework */; }; + 4C58D05A1CAC324100A6DF33 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */; }; + 4C63EDBE1BD94F6E00209E09 /* CustomerObjectEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.swift */; }; + 4C63EDC11BD95A2700209E09 /* ColumnLayoutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.swift */; }; + 4C63EDC61BDA1AED00209E09 /* ColumnReordererTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.swift */; }; + 4CA291021C07BD78008EA95D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CA291041C07BD78008EA95D /* Localizable.strings */; }; + 4CA67B5B1CAFE64700A1EE91 /* YouTubeCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.swift */; }; + 4CA67B5E1CAFE76700A1EE91 /* SampleData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA67B5D1CAFE76700A1EE91 /* SampleData.swift */; }; + 4CE266B41CB43C6000FD8F3C /* FilterGridViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.swift */; }; + F235736B1B44608100F300D7 /* License.swift in Sources */ = {isa = PBXBuildFile; fileRef = F235736A1B44608100F300D7 /* License.swift */; }; + F23675D31B59503000194040 /* EditConfirmationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F23675D21B59503000194040 /* EditConfirmationController.swift */; }; + F2BA19581B288F1600F2B835 /* GettingStartedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2BA19571B288F1600F2B835 /* GettingStartedController.swift */; }; + F2CFF3BF1B7122BB00FE6FDF /* FilterData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2CFF3BE1B7122BB00FE6FDF /* FilterData.swift */; }; + F2E2A9F61B27254E00AFEA5D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2A9F51B27254E00AFEA5D /* AppDelegate.swift */; }; + F2E2A9FC1B27254E00AFEA5D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FA1B27254E00AFEA5D /* Main.storyboard */; }; + F2E2A9FE1B27254E00AFEA5D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */; }; + F2E2AA011B27254E00AFEA5D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F2E2A9FF1B27254E00AFEA5D /* LaunchScreen.xib */; }; + F2E2AA0D1B27254E00AFEA5D /* FlexGrid101Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA0C1B27254E00AFEA5D /* FlexGrid101Tests.swift */; }; + F2E2AA291B27302300AFEA5D /* ColumnDefinitionsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.swift */; }; + F2E2AA2C1B27303700AFEA5D /* SelectionModesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA2B1B27303700AFEA5D /* SelectionModesController.swift */; }; + F2E2AA2F1B27304C00AFEA5D /* CustomCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.swift */; }; + F2E2AA321B27306300AFEA5D /* GroupingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA311B27306300AFEA5D /* GroupingController.swift */; }; + F2E2AA351B27307300AFEA5D /* FilterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA341B27307300AFEA5D /* FilterController.swift */; }; + F2E2AA381B27308500AFEA5D /* FullTextFilterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA371B27308500AFEA5D /* FullTextFilterController.swift */; }; + F2E2AA3E1B2731B700AFEA5D /* CustomerData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2E2AA3D1B2731B700AFEA5D /* CustomerData.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - F273C1D81B45C40A00958473 /* PBXContainerItemProxy */ = { + F2E2AA071B27254E00AFEA5D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = F273C1BA1B45C40A00958473 /* Project object */; + containerPortal = F2E2A9E51B27254C00AFEA5D /* Project object */; proxyType = 1; - remoteGlobalIDString = F273C1C11B45C40A00958473; + remoteGlobalIDString = F2E2A9EC1B27254C00AFEA5D; remoteInfo = FlexGrid101; }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4C6165221D18490E0044D30A /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4C06B2CE1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Embed Frameworks */, + 4C06B2CC1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4C06B2D01D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ - 4C0AC1471C07C27300E3BA6F /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; - 4C0AC1481C07C27300E3BA6F /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; - 4C0AC14A1C07C27800E3BA6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; - 4C0AC14C1C07C27A00E3BA6F /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; - 4C12C94D1C92C4E400F45F92 /* filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = filter.png; sourceTree = ""; }; - 4C12C94E1C92C4E400F45F92 /* flexgrid_columns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_columns.png; sourceTree = ""; }; - 4C12C94F1C92C4E400F45F92 /* flexgrid_custom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_custom.png; sourceTree = ""; }; - 4C12C9501C92C4E400F45F92 /* flexgrid_filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_filter.png; sourceTree = ""; }; - 4C12C9511C92C4E400F45F92 /* flexgrid_freezing.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_freezing.png; sourceTree = ""; }; - 4C12C9521C92C4E400F45F92 /* flexgrid_grouping.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_grouping.png; sourceTree = ""; }; - 4C12C9531C92C4E400F45F92 /* flexgrid_loading.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_loading.png; sourceTree = ""; }; - 4C12C9541C92C4E400F45F92 /* flexgrid_merging.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_merging.png; sourceTree = ""; }; - 4C12C9551C92C4E400F45F92 /* flexgrid_rowdetails.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_rowdetails.png; sourceTree = ""; }; - 4C12C9561C92C4E400F45F92 /* flexgrid_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_selection.png; sourceTree = ""; }; - 4C12C9571C92C4E400F45F92 /* flexgrid.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid.png; sourceTree = ""; }; - 4C12C9581C92C4E400F45F92 /* hide.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hide.png; sourceTree = ""; }; - 4C12C9591C92C4E400F45F92 /* input_form.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = input_form.png; sourceTree = ""; }; - 4C12C95A1C92C4E400F45F92 /* retro_TV_filled-50_light.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "retro_TV_filled-50_light.png"; sourceTree = ""; }; - 4C12C95B1C92C4E400F45F92 /* show.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = show.png; sourceTree = ""; }; - 4C12C96B1C92C8B500F45F92 /* RowDetailsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowDetailsViewController.swift; sourceTree = ""; }; - 4C12C96D1C92C9F300F45F92 /* CustomMergingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomMergingViewController.swift; sourceTree = ""; }; - 4C3C7B281C049EF500D2655C /* ColumnLayoutController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnLayoutController.swift; sourceTree = ""; }; - 4C3C7B291C049EF500D2655C /* ColumnReordererTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnReordererTableViewController.swift; sourceTree = ""; }; - 4C3C7B2A1C049EF500D2655C /* CustomerObjectEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomerObjectEditor.swift; sourceTree = ""; }; - 4C3C7B2B1C049EF500D2655C /* EditingFormController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditingFormController.swift; sourceTree = ""; }; - 4C3C7B2C1C049EF500D2655C /* OnDemandController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnDemandController.swift; sourceTree = ""; }; - 4C435C9B1BD563180099A651 /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; - 4C435C9C1BD563180099A651 /* XuniFlexGridKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexGridKit.framework; path = "../../../../Controls/XuniFlexGridKit.framework"; sourceTree = ""; }; - 4C435C9D1BD563180099A651 /* XuniGaugeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeKit.framework; path = "../../../../Controls/XuniGaugeKit.framework"; sourceTree = ""; }; - 4C435CA61BD7C2410099A651 /* StarSizingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarSizingController.swift; sourceTree = ""; }; - 4C435CAB1BD804F80099A651 /* FrozenCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrozenCellsController.swift; sourceTree = ""; }; - 4C435CB81BD8D10B0099A651 /* ConditionalFormattingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalFormattingController.swift; sourceTree = ""; }; - F229417C1B504196007703FD /* SharedFilterData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedFilterData.swift; sourceTree = ""; }; - F23675CF1B592C9B00194040 /* EditConfirmationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditConfirmationController.swift; sourceTree = ""; }; - F273C1C21B45C40A00958473 /* FlexGrid101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlexGrid101.app; sourceTree = BUILT_PRODUCTS_DIR; }; - F273C1C61B45C40A00958473 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F273C1C71B45C40A00958473 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - F273C1C91B45C40A00958473 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - F273C1CC1B45C40A00958473 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - F273C1CE1B45C40A00958473 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - F273C1D11B45C40A00958473 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - F273C1D71B45C40A00958473 /* FlexGrid101Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlexGrid101Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - F273C1DC1B45C40A00958473 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F273C1DD1B45C40A00958473 /* FlexGrid101Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlexGrid101Tests.swift; sourceTree = ""; }; - F273C1E71B45C7BA00958473 /* GettingStartedController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GettingStartedController.swift; sourceTree = ""; }; - F273C1E91B45CA7C00958473 /* ColumnDefinitionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnDefinitionController.swift; sourceTree = ""; }; - F273C1EB1B45CAA900958473 /* SelectionModesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectionModesController.swift; sourceTree = ""; }; - F273C1ED1B45CAC400958473 /* CustomCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCellsController.swift; sourceTree = ""; }; - F273C1EF1B45CAD500958473 /* GroupingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupingController.swift; sourceTree = ""; }; - F273C1F11B45CAE400958473 /* FilterController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterController.swift; sourceTree = ""; }; - F273C1F31B45CAFD00958473 /* FullTextFilterController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullTextFilterController.swift; sourceTree = ""; }; - F273C1F51B45CB1900958473 /* EditingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditingController.swift; sourceTree = ""; }; - F273C1F71B45CB3100958473 /* FilterFormController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterFormController.swift; sourceTree = ""; }; - F273C1F91B45CB5B00958473 /* CustomerData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomerData.swift; sourceTree = ""; }; - F273C1FB1B45CB7A00958473 /* License.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = License.swift; sourceTree = ""; }; + 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; + 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniFlexGridDynamicKit.framework; path = ../../../Controls/XuniFlexGridDynamicKit.framework; sourceTree = ""; }; + 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeDynamicKit.framework; path = ../../../Controls/XuniGaugeDynamicKit.framework; sourceTree = ""; }; + 4C1C57051D26DED3007491EB /* flexgrid_headers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_headers.png; sourceTree = ""; }; + 4C219E711C91B3240089B6B0 /* filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = filter.png; sourceTree = ""; }; + 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_columns.png; sourceTree = ""; }; + 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_custom.png; sourceTree = ""; }; + 4C219E741C91B3240089B6B0 /* flexgrid_filter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_filter.png; sourceTree = ""; }; + 4C219E751C91B3240089B6B0 /* flexgrid_freezing.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_freezing.png; sourceTree = ""; }; + 4C219E761C91B3240089B6B0 /* flexgrid_grouping.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_grouping.png; sourceTree = ""; }; + 4C219E771C91B3240089B6B0 /* flexgrid_loading.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_loading.png; sourceTree = ""; }; + 4C219E781C91B3240089B6B0 /* flexgrid_merging.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_merging.png; sourceTree = ""; }; + 4C219E791C91B3240089B6B0 /* flexgrid_rowdetails.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_rowdetails.png; sourceTree = ""; }; + 4C219E7A1C91B3240089B6B0 /* flexgrid_selection.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid_selection.png; sourceTree = ""; }; + 4C219E7B1C91B3240089B6B0 /* flexgrid.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flexgrid.png; sourceTree = ""; }; + 4C219E7C1C91B3240089B6B0 /* hide.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hide.png; sourceTree = ""; }; + 4C219E7D1C91B3240089B6B0 /* input_form.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = input_form.png; sourceTree = ""; }; + 4C219E7E1C91B3240089B6B0 /* retro_TV_filled-50_light.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "retro_TV_filled-50_light.png"; sourceTree = ""; }; + 4C219E7F1C91B3240089B6B0 /* show.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = show.png; sourceTree = ""; }; + 4C219E911C91C3FD0089B6B0 /* RowDetailsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowDetailsViewController.swift; sourceTree = ""; }; + 4C219E971C91C90D0089B6B0 /* CustomMergingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomMergingViewController.swift; sourceTree = ""; }; + 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnboundSampleViewController.swift; sourceTree = ""; }; + 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XuniCoreDesignTimeStoryboardSupport.swift; path = ../../../Controls/XuniCoreDesignTimeStoryboardSupport.swift; sourceTree = ""; }; + 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XuniFlexGridDesignTimeStoryboardSupport.swift; path = ../../../Controls/XuniFlexGridDesignTimeStoryboardSupport.swift; sourceTree = ""; }; + 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XuniGaugeDesignTimeStoryboardSupport.swift; path = ../../../Controls/XuniGaugeDesignTimeStoryboardSupport.swift; sourceTree = ""; }; + 4C41F60D1BDE854900D3F97A /* OnDemandController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnDemandController.swift; sourceTree = ""; }; + 4C435CA41BD7AA1D0099A651 /* StarSizingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarSizingController.swift; sourceTree = ""; }; + 4C435CA91BD7FD930099A651 /* FrozenCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrozenCellsController.swift; sourceTree = ""; }; + 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalFormattingController.swift; sourceTree = ""; }; + 4C435CBB1BD8D92B0099A651 /* EditingFormController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditingFormController.swift; sourceTree = ""; }; + 4C58D04B1CA9B8EB00A6DF33 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; + 4C58D0571CAC305100A6DF33 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomerObjectEditor.swift; sourceTree = ""; }; + 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnLayoutController.swift; sourceTree = ""; }; + 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnReordererTableViewController.swift; sourceTree = ""; }; + 4CA291011C07BD70008EA95D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 4CA291031C07BD78008EA95D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + 4CA291051C07BD7A008EA95D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YouTubeCollectionView.swift; sourceTree = ""; }; + 4CA67B5D1CAFE76700A1EE91 /* SampleData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SampleData.swift; sourceTree = ""; }; + 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterGridViewController.swift; sourceTree = ""; }; + F235736A1B44608100F300D7 /* License.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = License.swift; sourceTree = ""; }; + F23675D21B59503000194040 /* EditConfirmationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditConfirmationController.swift; sourceTree = ""; }; + F2BA19571B288F1600F2B835 /* GettingStartedController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GettingStartedController.swift; sourceTree = ""; }; + F2CFF3BE1B7122BB00FE6FDF /* FilterData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterData.swift; sourceTree = ""; }; + F2E2A9ED1B27254C00AFEA5D /* FlexGrid101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlexGrid101.app; sourceTree = BUILT_PRODUCTS_DIR; }; + F2E2A9F11B27254E00AFEA5D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F2E2A9F51B27254E00AFEA5D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + F2E2A9FB1B27254E00AFEA5D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + F2E2AA001B27254E00AFEA5D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + F2E2AA061B27254E00AFEA5D /* FlexGrid101Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlexGrid101Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + F2E2AA0B1B27254E00AFEA5D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F2E2AA0C1B27254E00AFEA5D /* FlexGrid101Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlexGrid101Tests.swift; sourceTree = ""; }; + F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColumnDefinitionsController.swift; sourceTree = ""; }; + F2E2AA2B1B27303700AFEA5D /* SelectionModesController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectionModesController.swift; sourceTree = ""; }; + F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCellsController.swift; sourceTree = ""; }; + F2E2AA311B27306300AFEA5D /* GroupingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupingController.swift; sourceTree = ""; }; + F2E2AA341B27307300AFEA5D /* FilterController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterController.swift; sourceTree = ""; }; + F2E2AA371B27308500AFEA5D /* FullTextFilterController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullTextFilterController.swift; sourceTree = ""; }; + F2E2AA3D1B2731B700AFEA5D /* CustomerData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomerData.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - F273C1BF1B45C40A00958473 /* Frameworks */ = { + F2E2A9EA1B27254C00AFEA5D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C435C9E1BD563180099A651 /* XuniCoreKit.framework in Frameworks */, - 4C435C9F1BD563180099A651 /* XuniFlexGridKit.framework in Frameworks */, - 4C435CA01BD563180099A651 /* XuniGaugeKit.framework in Frameworks */, + 4C06B2CD1D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework in Frameworks */, + 4C58D05A1CAC324100A6DF33 /* CoreLocation.framework in Frameworks */, + 4C06B2CB1D1F50F600363CF9 /* XuniCoreDynamicKit.framework in Frameworks */, + 4C06B2CF1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework in Frameworks */, + 4C58D0581CAC305100A6DF33 /* MapKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F273C1D41B45C40A00958473 /* Frameworks */ = { + F2E2AA031B27254E00AFEA5D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -146,108 +181,267 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4C12C94C1C92C4C700F45F92 /* Images */ = { + 4C219E701C91B30E0089B6B0 /* Images */ = { isa = PBXGroup; children = ( - 4C12C94D1C92C4E400F45F92 /* filter.png */, - 4C12C94E1C92C4E400F45F92 /* flexgrid_columns.png */, - 4C12C94F1C92C4E400F45F92 /* flexgrid_custom.png */, - 4C12C9501C92C4E400F45F92 /* flexgrid_filter.png */, - 4C12C9511C92C4E400F45F92 /* flexgrid_freezing.png */, - 4C12C9521C92C4E400F45F92 /* flexgrid_grouping.png */, - 4C12C9531C92C4E400F45F92 /* flexgrid_loading.png */, - 4C12C9541C92C4E400F45F92 /* flexgrid_merging.png */, - 4C12C9551C92C4E400F45F92 /* flexgrid_rowdetails.png */, - 4C12C9561C92C4E400F45F92 /* flexgrid_selection.png */, - 4C12C9571C92C4E400F45F92 /* flexgrid.png */, - 4C12C9581C92C4E400F45F92 /* hide.png */, - 4C12C9591C92C4E400F45F92 /* input_form.png */, - 4C12C95A1C92C4E400F45F92 /* retro_TV_filled-50_light.png */, - 4C12C95B1C92C4E400F45F92 /* show.png */, + 4C1C57051D26DED3007491EB /* flexgrid_headers.png */, + 4C219E711C91B3240089B6B0 /* filter.png */, + 4C219E721C91B3240089B6B0 /* flexgrid_columns.png */, + 4C219E731C91B3240089B6B0 /* flexgrid_custom.png */, + 4C219E741C91B3240089B6B0 /* flexgrid_filter.png */, + 4C219E751C91B3240089B6B0 /* flexgrid_freezing.png */, + 4C219E761C91B3240089B6B0 /* flexgrid_grouping.png */, + 4C219E771C91B3240089B6B0 /* flexgrid_loading.png */, + 4C219E781C91B3240089B6B0 /* flexgrid_merging.png */, + 4C219E791C91B3240089B6B0 /* flexgrid_rowdetails.png */, + 4C219E7A1C91B3240089B6B0 /* flexgrid_selection.png */, + 4C219E7B1C91B3240089B6B0 /* flexgrid.png */, + 4C219E7C1C91B3240089B6B0 /* hide.png */, + 4C219E7D1C91B3240089B6B0 /* input_form.png */, + 4C219E7E1C91B3240089B6B0 /* retro_TV_filled-50_light.png */, + 4C219E7F1C91B3240089B6B0 /* show.png */, ); name = Images; sourceTree = ""; }; - F273C1B91B45C40A00958473 = { + 4C219E8F1C91C3ED0089B6B0 /* RowDetails */ = { isa = PBXGroup; children = ( - 4C435C9B1BD563180099A651 /* XuniCoreKit.framework */, - 4C435C9C1BD563180099A651 /* XuniFlexGridKit.framework */, - 4C435C9D1BD563180099A651 /* XuniGaugeKit.framework */, - F273C1C41B45C40A00958473 /* FlexGrid101 */, - F273C1DA1B45C40A00958473 /* FlexGrid101Tests */, - F273C1C31B45C40A00958473 /* Products */, + 4C219E911C91C3FD0089B6B0 /* RowDetailsViewController.swift */, ); + name = RowDetails; sourceTree = ""; }; - F273C1C31B45C40A00958473 /* Products */ = { + 4C219E951C91C8FA0089B6B0 /* CustomMerging */ = { isa = PBXGroup; children = ( - F273C1C21B45C40A00958473 /* FlexGrid101.app */, - F273C1D71B45C40A00958473 /* FlexGrid101Tests.xctest */, + 4C219E971C91C90D0089B6B0 /* CustomMergingViewController.swift */, + ); + name = CustomMerging; + sourceTree = ""; + }; + 4C26BAA71D13058E00F65D77 /* Unbound */ = { + isa = PBXGroup; + children = ( + 4C26BAA91D1305AA00F65D77 /* UnboundSampleViewController.swift */, + ); + name = Unbound; + sourceTree = ""; + }; + 4C58D0431CA9583200A6DF33 /* ColumnDefinitions */ = { + isa = PBXGroup; + children = ( + F2E2AA281B27302300AFEA5D /* ColumnDefinitionsController.swift */, + ); + name = ColumnDefinitions; + sourceTree = ""; + }; + 4C58D0441CA95E2F00A6DF33 /* Data Model */ = { + isa = PBXGroup; + children = ( + F2E2AA3D1B2731B700AFEA5D /* CustomerData.swift */, + ); + name = "Data Model"; + sourceTree = ""; + }; + 4C58D0451CA95E3A00A6DF33 /* Samples */ = { + isa = PBXGroup; + children = ( + 4C26BAA71D13058E00F65D77 /* Unbound */, + 4CA67B651CB1CFA700A1EE91 /* Filter */, + 4CA67B641CB1CE9D00A1EE91 /* FullTextFilter */, + 4CA67B631CB1B29800A1EE91 /* Freezing&Merging */, + 4CA67B621CB1B09E00A1EE91 /* Star Sizing */, + 4CA67B611CB1A5A600A1EE91 /* ColumnLayout */, + 4CA67B551CAFE5EB00A1EE91 /* OnDemand */, + 4C58D0561CAAA3FD00A6DF33 /* Grouping */, + 4C58D04D1CAA998100A6DF33 /* CustomCells */, + 4C58D04C1CAA967200A6DF33 /* ConditionalFormatting */, + 4C58D0461CA9639C00A6DF33 /* GettingStarted */, + 4C58D0491CA9B02F00A6DF33 /* EditingForm */, + 4C58D0481CA9AD7200A6DF33 /* EditConfirmation */, + 4C58D0471CA99EB400A6DF33 /* SelectionModes */, + 4C58D0431CA9583200A6DF33 /* ColumnDefinitions */, + 4C219E8F1C91C3ED0089B6B0 /* RowDetails */, + 4C219E951C91C8FA0089B6B0 /* CustomMerging */, + ); + name = Samples; + sourceTree = ""; + }; + 4C58D0461CA9639C00A6DF33 /* GettingStarted */ = { + isa = PBXGroup; + children = ( + F2BA19571B288F1600F2B835 /* GettingStartedController.swift */, + ); + name = GettingStarted; + sourceTree = ""; + }; + 4C58D0471CA99EB400A6DF33 /* SelectionModes */ = { + isa = PBXGroup; + children = ( + F2E2AA2B1B27303700AFEA5D /* SelectionModesController.swift */, + ); + name = SelectionModes; + sourceTree = ""; + }; + 4C58D0481CA9AD7200A6DF33 /* EditConfirmation */ = { + isa = PBXGroup; + children = ( + F23675D21B59503000194040 /* EditConfirmationController.swift */, + ); + name = EditConfirmation; + sourceTree = ""; + }; + 4C58D0491CA9B02F00A6DF33 /* EditingForm */ = { + isa = PBXGroup; + children = ( + 4C63EDBD1BD94F6E00209E09 /* CustomerObjectEditor.swift */, + 4C435CBB1BD8D92B0099A651 /* EditingFormController.swift */, + ); + name = EditingForm; + sourceTree = ""; + }; + 4C58D04C1CAA967200A6DF33 /* ConditionalFormatting */ = { + isa = PBXGroup; + children = ( + 4C435CB01BD8C5F10099A651 /* ConditionalFormattingController.swift */, + ); + name = ConditionalFormatting; + sourceTree = ""; + }; + 4C58D04D1CAA998100A6DF33 /* CustomCells */ = { + isa = PBXGroup; + children = ( + F2E2AA2E1B27304C00AFEA5D /* CustomCellsController.swift */, + ); + name = CustomCells; + sourceTree = ""; + }; + 4C58D0561CAAA3FD00A6DF33 /* Grouping */ = { + isa = PBXGroup; + children = ( + F2E2AA311B27306300AFEA5D /* GroupingController.swift */, + ); + name = Grouping; + sourceTree = ""; + }; + 4CA67B551CAFE5EB00A1EE91 /* OnDemand */ = { + isa = PBXGroup; + children = ( + 4CA67B5D1CAFE76700A1EE91 /* SampleData.swift */, + 4CA67B5A1CAFE64700A1EE91 /* YouTubeCollectionView.swift */, + 4C41F60D1BDE854900D3F97A /* OnDemandController.swift */, + ); + name = OnDemand; + sourceTree = ""; + }; + 4CA67B611CB1A5A600A1EE91 /* ColumnLayout */ = { + isa = PBXGroup; + children = ( + 4C63EDC51BDA1AED00209E09 /* ColumnReordererTableViewController.swift */, + 4C63EDC01BD95A2700209E09 /* ColumnLayoutController.swift */, + ); + name = ColumnLayout; + sourceTree = ""; + }; + 4CA67B621CB1B09E00A1EE91 /* Star Sizing */ = { + isa = PBXGroup; + children = ( + 4C435CA41BD7AA1D0099A651 /* StarSizingController.swift */, + ); + name = "Star Sizing"; + sourceTree = ""; + }; + 4CA67B631CB1B29800A1EE91 /* Freezing&Merging */ = { + isa = PBXGroup; + children = ( + 4C435CA91BD7FD930099A651 /* FrozenCellsController.swift */, + ); + name = "Freezing&Merging"; + sourceTree = ""; + }; + 4CA67B641CB1CE9D00A1EE91 /* FullTextFilter */ = { + isa = PBXGroup; + children = ( + F2E2AA371B27308500AFEA5D /* FullTextFilterController.swift */, + ); + name = FullTextFilter; + sourceTree = ""; + }; + 4CA67B651CB1CFA700A1EE91 /* Filter */ = { + isa = PBXGroup; + children = ( + F2E2AA341B27307300AFEA5D /* FilterController.swift */, + F2CFF3BE1B7122BB00FE6FDF /* FilterData.swift */, + 4CE266B31CB43C6000FD8F3C /* FilterGridViewController.swift */, + ); + name = Filter; + sourceTree = ""; + }; + F2E2A9E41B27254C00AFEA5D = { + isa = PBXGroup; + children = ( + 4C393DD01D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.swift */, + 4C393DD11D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.swift */, + 4C393DCE1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.swift */, + 4C06B2C81D1F50F600363CF9 /* XuniCoreDynamicKit.framework */, + 4C06B2C91D1F50F600363CF9 /* XuniFlexGridDynamicKit.framework */, + 4C06B2CA1D1F50F600363CF9 /* XuniGaugeDynamicKit.framework */, + 4C58D0591CAC324100A6DF33 /* CoreLocation.framework */, + 4C58D0571CAC305100A6DF33 /* MapKit.framework */, + F2E2A9EF1B27254C00AFEA5D /* FlexGrid101 */, + F2E2AA091B27254E00AFEA5D /* FlexGrid101Tests */, + F2E2A9EE1B27254C00AFEA5D /* Products */, + ); + sourceTree = ""; + }; + F2E2A9EE1B27254C00AFEA5D /* Products */ = { + isa = PBXGroup; + children = ( + F2E2A9ED1B27254C00AFEA5D /* FlexGrid101.app */, + F2E2AA061B27254E00AFEA5D /* FlexGrid101Tests.xctest */, ); name = Products; sourceTree = ""; }; - F273C1C41B45C40A00958473 /* FlexGrid101 */ = { + F2E2A9EF1B27254C00AFEA5D /* FlexGrid101 */ = { isa = PBXGroup; children = ( - 4C12C94C1C92C4C700F45F92 /* Images */, - 4C3C7B281C049EF500D2655C /* ColumnLayoutController.swift */, - 4C12C96B1C92C8B500F45F92 /* RowDetailsViewController.swift */, - 4C3C7B291C049EF500D2655C /* ColumnReordererTableViewController.swift */, - 4C3C7B2A1C049EF500D2655C /* CustomerObjectEditor.swift */, - 4C3C7B2B1C049EF500D2655C /* EditingFormController.swift */, - 4C3C7B2C1C049EF500D2655C /* OnDemandController.swift */, - F273C1C71B45C40A00958473 /* AppDelegate.swift */, - F273C1C91B45C40A00958473 /* ViewController.swift */, - F273C1CB1B45C40A00958473 /* Main.storyboard */, - F273C1CE1B45C40A00958473 /* Images.xcassets */, - F273C1D01B45C40A00958473 /* LaunchScreen.xib */, - F273C1C51B45C40A00958473 /* Supporting Files */, - F273C1E71B45C7BA00958473 /* GettingStartedController.swift */, - F273C1E91B45CA7C00958473 /* ColumnDefinitionController.swift */, - F273C1EB1B45CAA900958473 /* SelectionModesController.swift */, - F273C1ED1B45CAC400958473 /* CustomCellsController.swift */, - F273C1EF1B45CAD500958473 /* GroupingController.swift */, - F273C1F11B45CAE400958473 /* FilterController.swift */, - F273C1F31B45CAFD00958473 /* FullTextFilterController.swift */, - F273C1F51B45CB1900958473 /* EditingController.swift */, - F273C1F71B45CB3100958473 /* FilterFormController.swift */, - F273C1F91B45CB5B00958473 /* CustomerData.swift */, - F273C1FB1B45CB7A00958473 /* License.swift */, - F229417C1B504196007703FD /* SharedFilterData.swift */, - F23675CF1B592C9B00194040 /* EditConfirmationController.swift */, - 4C435CA61BD7C2410099A651 /* StarSizingController.swift */, - 4C435CAB1BD804F80099A651 /* FrozenCellsController.swift */, - 4C435CB81BD8D10B0099A651 /* ConditionalFormattingController.swift */, - 4C0AC14B1C07C27800E3BA6F /* Localizable.strings */, - 4C12C96D1C92C9F300F45F92 /* CustomMergingViewController.swift */, + 4C219E701C91B30E0089B6B0 /* Images */, + 4C58D0441CA95E2F00A6DF33 /* Data Model */, + 4C58D0451CA95E3A00A6DF33 /* Samples */, + F2E2A9F51B27254E00AFEA5D /* AppDelegate.swift */, + F235736A1B44608100F300D7 /* License.swift */, + F2E2A9FA1B27254E00AFEA5D /* Main.storyboard */, + F2E2A9FD1B27254E00AFEA5D /* Images.xcassets */, + F2E2A9FF1B27254E00AFEA5D /* LaunchScreen.xib */, + F2E2A9F01B27254E00AFEA5D /* Supporting Files */, + 4CA291041C07BD78008EA95D /* Localizable.strings */, ); path = FlexGrid101; sourceTree = ""; }; - F273C1C51B45C40A00958473 /* Supporting Files */ = { + F2E2A9F01B27254E00AFEA5D /* Supporting Files */ = { isa = PBXGroup; children = ( - F273C1C61B45C40A00958473 /* Info.plist */, + F2E2A9F11B27254E00AFEA5D /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; - F273C1DA1B45C40A00958473 /* FlexGrid101Tests */ = { + F2E2AA091B27254E00AFEA5D /* FlexGrid101Tests */ = { isa = PBXGroup; children = ( - F273C1DD1B45C40A00958473 /* FlexGrid101Tests.swift */, - F273C1DB1B45C40A00958473 /* Supporting Files */, + F2E2AA0C1B27254E00AFEA5D /* FlexGrid101Tests.swift */, + F2E2AA0A1B27254E00AFEA5D /* Supporting Files */, ); path = FlexGrid101Tests; sourceTree = ""; }; - F273C1DB1B45C40A00958473 /* Supporting Files */ = { + F2E2AA0A1B27254E00AFEA5D /* Supporting Files */ = { isa = PBXGroup; children = ( - F273C1DC1B45C40A00958473 /* Info.plist */, + F2E2AA0B1B27254E00AFEA5D /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -255,13 +449,14 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - F273C1C11B45C40A00958473 /* FlexGrid101 */ = { + F2E2A9EC1B27254C00AFEA5D /* FlexGrid101 */ = { isa = PBXNativeTarget; - buildConfigurationList = F273C1E11B45C40A00958473 /* Build configuration list for PBXNativeTarget "FlexGrid101" */; + buildConfigurationList = F2E2AA101B27254E00AFEA5D /* Build configuration list for PBXNativeTarget "FlexGrid101" */; buildPhases = ( - F273C1BE1B45C40A00958473 /* Sources */, - F273C1BF1B45C40A00958473 /* Frameworks */, - F273C1C01B45C40A00958473 /* Resources */, + F2E2A9E91B27254C00AFEA5D /* Sources */, + F2E2A9EA1B27254C00AFEA5D /* Frameworks */, + F2E2A9EB1B27254C00AFEA5D /* Resources */, + 4C6165221D18490E0044D30A /* Embed Frameworks */, ); buildRules = ( ); @@ -269,47 +464,48 @@ ); name = FlexGrid101; productName = FlexGrid101; - productReference = F273C1C21B45C40A00958473 /* FlexGrid101.app */; + productReference = F2E2A9ED1B27254C00AFEA5D /* FlexGrid101.app */; productType = "com.apple.product-type.application"; }; - F273C1D61B45C40A00958473 /* FlexGrid101Tests */ = { + F2E2AA051B27254E00AFEA5D /* FlexGrid101Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = F273C1E41B45C40A00958473 /* Build configuration list for PBXNativeTarget "FlexGrid101Tests" */; + buildConfigurationList = F2E2AA131B27254E00AFEA5D /* Build configuration list for PBXNativeTarget "FlexGrid101Tests" */; buildPhases = ( - F273C1D31B45C40A00958473 /* Sources */, - F273C1D41B45C40A00958473 /* Frameworks */, - F273C1D51B45C40A00958473 /* Resources */, + F2E2AA021B27254E00AFEA5D /* Sources */, + F2E2AA031B27254E00AFEA5D /* Frameworks */, + F2E2AA041B27254E00AFEA5D /* Resources */, ); buildRules = ( ); dependencies = ( - F273C1D91B45C40A00958473 /* PBXTargetDependency */, + F2E2AA081B27254E00AFEA5D /* PBXTargetDependency */, ); name = FlexGrid101Tests; productName = FlexGrid101Tests; - productReference = F273C1D71B45C40A00958473 /* FlexGrid101Tests.xctest */; + productReference = F2E2AA061B27254E00AFEA5D /* FlexGrid101Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - F273C1BA1B45C40A00958473 /* Project object */ = { + F2E2A9E51B27254C00AFEA5D /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0700; + LastSwiftMigration = 0730; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0630; ORGANIZATIONNAME = GrapeCity; TargetAttributes = { - F273C1C11B45C40A00958473 = { + F2E2A9EC1B27254C00AFEA5D = { CreatedOnToolsVersion = 6.3.2; }; - F273C1D61B45C40A00958473 = { + F2E2AA051B27254E00AFEA5D = { CreatedOnToolsVersion = 6.3.2; - TestTargetID = F273C1C11B45C40A00958473; + TestTargetID = F2E2A9EC1B27254C00AFEA5D; }; }; }; - buildConfigurationList = F273C1BD1B45C40A00958473 /* Build configuration list for PBXProject "FlexGrid101" */; + buildConfigurationList = F2E2A9E81B27254C00AFEA5D /* Build configuration list for PBXProject "FlexGrid101" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -318,45 +514,46 @@ Base, ja, ); - mainGroup = F273C1B91B45C40A00958473; - productRefGroup = F273C1C31B45C40A00958473 /* Products */; + mainGroup = F2E2A9E41B27254C00AFEA5D; + productRefGroup = F2E2A9EE1B27254C00AFEA5D /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - F273C1C11B45C40A00958473 /* FlexGrid101 */, - F273C1D61B45C40A00958473 /* FlexGrid101Tests */, + F2E2A9EC1B27254C00AFEA5D /* FlexGrid101 */, + F2E2AA051B27254E00AFEA5D /* FlexGrid101Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - F273C1C01B45C40A00958473 /* Resources */ = { + F2E2A9EB1B27254C00AFEA5D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4C12C9631C92C4E400F45F92 /* flexgrid_merging.png in Resources */, - 4C12C95F1C92C4E400F45F92 /* flexgrid_filter.png in Resources */, - 4C12C9601C92C4E400F45F92 /* flexgrid_freezing.png in Resources */, - 4C12C9641C92C4E400F45F92 /* flexgrid_rowdetails.png in Resources */, - 4C12C95E1C92C4E400F45F92 /* flexgrid_custom.png in Resources */, - 4C12C9671C92C4E400F45F92 /* hide.png in Resources */, - 4C12C95D1C92C4E400F45F92 /* flexgrid_columns.png in Resources */, - F273C1CD1B45C40A00958473 /* Main.storyboard in Resources */, - 4C0AC1491C07C27800E3BA6F /* Localizable.strings in Resources */, - 4C12C95C1C92C4E400F45F92 /* filter.png in Resources */, - 4C12C9691C92C4E400F45F92 /* retro_TV_filled-50_light.png in Resources */, - 4C12C9621C92C4E400F45F92 /* flexgrid_loading.png in Resources */, - 4C12C96A1C92C4E400F45F92 /* show.png in Resources */, - 4C12C9611C92C4E400F45F92 /* flexgrid_grouping.png in Resources */, - 4C12C9661C92C4E400F45F92 /* flexgrid.png in Resources */, - F273C1D21B45C40A00958473 /* LaunchScreen.xib in Resources */, - F273C1CF1B45C40A00958473 /* Images.xcassets in Resources */, - 4C12C9651C92C4E400F45F92 /* flexgrid_selection.png in Resources */, - 4C12C9681C92C4E400F45F92 /* input_form.png in Resources */, + 4C219E871C91B3240089B6B0 /* flexgrid_merging.png in Resources */, + 4C219E831C91B3240089B6B0 /* flexgrid_filter.png in Resources */, + 4C219E841C91B3240089B6B0 /* flexgrid_freezing.png in Resources */, + 4C219E881C91B3240089B6B0 /* flexgrid_rowdetails.png in Resources */, + 4C219E821C91B3240089B6B0 /* flexgrid_custom.png in Resources */, + 4C219E8B1C91B3240089B6B0 /* hide.png in Resources */, + 4C219E811C91B3240089B6B0 /* flexgrid_columns.png in Resources */, + F2E2A9FC1B27254E00AFEA5D /* Main.storyboard in Resources */, + 4CA291021C07BD78008EA95D /* Localizable.strings in Resources */, + 4C219E801C91B3240089B6B0 /* filter.png in Resources */, + 4C219E8D1C91B3240089B6B0 /* retro_TV_filled-50_light.png in Resources */, + 4C219E861C91B3240089B6B0 /* flexgrid_loading.png in Resources */, + 4C219E8E1C91B3240089B6B0 /* show.png in Resources */, + 4C219E851C91B3240089B6B0 /* flexgrid_grouping.png in Resources */, + 4C219E8A1C91B3240089B6B0 /* flexgrid.png in Resources */, + F2E2AA011B27254E00AFEA5D /* LaunchScreen.xib in Resources */, + F2E2A9FE1B27254E00AFEA5D /* Images.xcassets in Resources */, + 4C219E891C91B3240089B6B0 /* flexgrid_selection.png in Resources */, + 4C219E8C1C91B3240089B6B0 /* input_form.png in Resources */, + 4C1C57061D26DED3007491EB /* flexgrid_headers.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F273C1D51B45C40A00958473 /* Resources */ = { + F2E2AA041B27254E00AFEA5D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -366,80 +563,84 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - F273C1BE1B45C40A00958473 /* Sources */ = { + F2E2A9E91B27254C00AFEA5D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F273C1F81B45CB3100958473 /* FilterFormController.swift in Sources */, - 4C3C7B2D1C049EF500D2655C /* ColumnLayoutController.swift in Sources */, - 4C3C7B2E1C049EF500D2655C /* ColumnReordererTableViewController.swift in Sources */, - 4C3C7B311C049EF500D2655C /* OnDemandController.swift in Sources */, - F273C1FA1B45CB5B00958473 /* CustomerData.swift in Sources */, - 4C3C7B301C049EF500D2655C /* EditingFormController.swift in Sources */, - F273C1F61B45CB1900958473 /* EditingController.swift in Sources */, - F273C1FC1B45CB7A00958473 /* License.swift in Sources */, - F273C1EC1B45CAA900958473 /* SelectionModesController.swift in Sources */, - 4C12C96E1C92C9F300F45F92 /* CustomMergingViewController.swift in Sources */, - F273C1EA1B45CA7C00958473 /* ColumnDefinitionController.swift in Sources */, - F273C1E81B45C7BA00958473 /* GettingStartedController.swift in Sources */, - 4C435CA71BD7C2410099A651 /* StarSizingController.swift in Sources */, - F273C1F21B45CAE400958473 /* FilterController.swift in Sources */, - 4C3C7B2F1C049EF500D2655C /* CustomerObjectEditor.swift in Sources */, - 4C12C96C1C92C8B500F45F92 /* RowDetailsViewController.swift in Sources */, - F273C1CA1B45C40A00958473 /* ViewController.swift in Sources */, - F273C1F01B45CAD500958473 /* GroupingController.swift in Sources */, - F229417D1B504196007703FD /* SharedFilterData.swift in Sources */, - F273C1EE1B45CAC400958473 /* CustomCellsController.swift in Sources */, - F273C1F41B45CAFD00958473 /* FullTextFilterController.swift in Sources */, - 4C435CAC1BD804F80099A651 /* FrozenCellsController.swift in Sources */, - 4C435CB91BD8D10B0099A651 /* ConditionalFormattingController.swift in Sources */, - F273C1C81B45C40A00958473 /* AppDelegate.swift in Sources */, - F23675D01B592C9B00194040 /* EditConfirmationController.swift in Sources */, + 4C41F60E1BDE854900D3F97A /* OnDemandController.swift in Sources */, + F23675D31B59503000194040 /* EditConfirmationController.swift in Sources */, + F2E2AA351B27307300AFEA5D /* FilterController.swift in Sources */, + F2E2AA291B27302300AFEA5D /* ColumnDefinitionsController.swift in Sources */, + 4C219E981C91C90D0089B6B0 /* CustomMergingViewController.swift in Sources */, + F2CFF3BF1B7122BB00FE6FDF /* FilterData.swift in Sources */, + 4C63EDBE1BD94F6E00209E09 /* CustomerObjectEditor.swift in Sources */, + 4CA67B5E1CAFE76700A1EE91 /* SampleData.swift in Sources */, + 4C435CA51BD7AA1E0099A651 /* StarSizingController.swift in Sources */, + F2E2A9F61B27254E00AFEA5D /* AppDelegate.swift in Sources */, + 4C219E921C91C3FD0089B6B0 /* RowDetailsViewController.swift in Sources */, + F235736B1B44608100F300D7 /* License.swift in Sources */, + F2E2AA3E1B2731B700AFEA5D /* CustomerData.swift in Sources */, + 4C393DCF1D2666BA0053B783 /* XuniCoreDesignTimeStoryboardSupport.swift in Sources */, + 4C26BAAA1D1305AA00F65D77 /* UnboundSampleViewController.swift in Sources */, + 4C435CBC1BD8D92B0099A651 /* EditingFormController.swift in Sources */, + F2E2AA2F1B27304C00AFEA5D /* CustomCellsController.swift in Sources */, + 4C63EDC11BD95A2700209E09 /* ColumnLayoutController.swift in Sources */, + 4C435CB11BD8C5F20099A651 /* ConditionalFormattingController.swift in Sources */, + 4C393DD31D2667150053B783 /* XuniGaugeDesignTimeStoryboardSupport.swift in Sources */, + 4C63EDC61BDA1AED00209E09 /* ColumnReordererTableViewController.swift in Sources */, + F2E2AA381B27308500AFEA5D /* FullTextFilterController.swift in Sources */, + F2E2AA321B27306300AFEA5D /* GroupingController.swift in Sources */, + 4C393DD21D2667150053B783 /* XuniFlexGridDesignTimeStoryboardSupport.swift in Sources */, + F2BA19581B288F1600F2B835 /* GettingStartedController.swift in Sources */, + 4CA67B5B1CAFE64700A1EE91 /* YouTubeCollectionView.swift in Sources */, + 4CE266B41CB43C6000FD8F3C /* FilterGridViewController.swift in Sources */, + F2E2AA2C1B27303700AFEA5D /* SelectionModesController.swift in Sources */, + 4C435CAA1BD7FD930099A651 /* FrozenCellsController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F273C1D31B45C40A00958473 /* Sources */ = { + F2E2AA021B27254E00AFEA5D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F273C1DE1B45C40A00958473 /* FlexGrid101Tests.swift in Sources */, + F2E2AA0D1B27254E00AFEA5D /* FlexGrid101Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - F273C1D91B45C40A00958473 /* PBXTargetDependency */ = { + F2E2AA081B27254E00AFEA5D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = F273C1C11B45C40A00958473 /* FlexGrid101 */; - targetProxy = F273C1D81B45C40A00958473 /* PBXContainerItemProxy */; + target = F2E2A9EC1B27254C00AFEA5D /* FlexGrid101 */; + targetProxy = F2E2AA071B27254E00AFEA5D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 4C0AC14B1C07C27800E3BA6F /* Localizable.strings */ = { + 4CA291041C07BD78008EA95D /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 4C0AC14A1C07C27800E3BA6F /* Base */, - 4C0AC14C1C07C27A00E3BA6F /* ja */, + 4CA291031C07BD78008EA95D /* Base */, + 4CA291051C07BD7A008EA95D /* ja */, ); name = Localizable.strings; sourceTree = ""; }; - F273C1CB1B45C40A00958473 /* Main.storyboard */ = { + F2E2A9FA1B27254E00AFEA5D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - F273C1CC1B45C40A00958473 /* Base */, - 4C0AC1471C07C27300E3BA6F /* ja */, + F2E2A9FB1B27254E00AFEA5D /* Base */, + 4C58D04B1CA9B8EB00A6DF33 /* ja */, ); name = Main.storyboard; sourceTree = ""; }; - F273C1D01B45C40A00958473 /* LaunchScreen.xib */ = { + F2E2A9FF1B27254E00AFEA5D /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( - F273C1D11B45C40A00958473 /* Base */, - 4C0AC1481C07C27300E3BA6F /* ja */, + F2E2AA001B27254E00AFEA5D /* Base */, + 4CA291011C07BD70008EA95D /* ja */, ); name = LaunchScreen.xib; sourceTree = ""; @@ -447,7 +648,7 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - F273C1DF1B45C40A00958473 /* Debug */ = { + F2E2AA0E1B27254E00AFEA5D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -467,8 +668,9 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ../../../Controls; + FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -488,12 +690,11 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - F273C1E01B45C40A00958473 /* Release */ = { + F2E2AA0F1B27254E00AFEA5D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -513,9 +714,10 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ../../../Controls; + FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -532,37 +734,33 @@ }; name = Release; }; - F273C1E21B45C40A00958473 /* Debug */ = { + F2E2AA111B27254E00AFEA5D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - ../../../Controls, - ../../../../../Controls, - ); + CODE_SIGN_IDENTITY = "iPhone Developer"; + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexGrid101/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(CONFIGURATION_BUILD_DIR)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - F273C1E31B45C40A00958473 /* Release */ = { + F2E2AA121B27254E00AFEA5D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - ../../../Controls, - ../../../../../Controls, - ); + CODE_SIGN_IDENTITY = "iPhone Developer"; + ENABLE_BITCODE = YES; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; INFOPLIST_FILE = FlexGrid101/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(CONFIGURATION_BUILD_DIR)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - F273C1E51B45C40A00958473 /* Debug */ = { + F2E2AA141B27254E00AFEA5D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; @@ -581,7 +779,7 @@ }; name = Debug; }; - F273C1E61B45C40A00958473 /* Release */ = { + F2E2AA151B27254E00AFEA5D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; @@ -599,34 +797,34 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - F273C1BD1B45C40A00958473 /* Build configuration list for PBXProject "FlexGrid101" */ = { + F2E2A9E81B27254C00AFEA5D /* Build configuration list for PBXProject "FlexGrid101" */ = { isa = XCConfigurationList; buildConfigurations = ( - F273C1DF1B45C40A00958473 /* Debug */, - F273C1E01B45C40A00958473 /* Release */, + F2E2AA0E1B27254E00AFEA5D /* Debug */, + F2E2AA0F1B27254E00AFEA5D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - F273C1E11B45C40A00958473 /* Build configuration list for PBXNativeTarget "FlexGrid101" */ = { + F2E2AA101B27254E00AFEA5D /* Build configuration list for PBXNativeTarget "FlexGrid101" */ = { isa = XCConfigurationList; buildConfigurations = ( - F273C1E21B45C40A00958473 /* Debug */, - F273C1E31B45C40A00958473 /* Release */, + F2E2AA111B27254E00AFEA5D /* Debug */, + F2E2AA121B27254E00AFEA5D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - F273C1E41B45C40A00958473 /* Build configuration list for PBXNativeTarget "FlexGrid101Tests" */ = { + F2E2AA131B27254E00AFEA5D /* Build configuration list for PBXNativeTarget "FlexGrid101Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - F273C1E51B45C40A00958473 /* Debug */, - F273C1E61B45C40A00958473 /* Release */, + F2E2AA141B27254E00AFEA5D /* Debug */, + F2E2AA151B27254E00AFEA5D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = F273C1BA1B45C40A00958473 /* Project object */; + rootObject = F2E2A9E51B27254C00AFEA5D /* Project object */; } diff --git a/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.xcworkspace/contents.xcworkspacedata index c305a4c..919434a 100644 --- a/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Swift/FlexGrid101/FlexGrid101.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Swift/FlexGrid101/FlexGrid101/AppDelegate.swift b/Swift/FlexGrid101/FlexGrid101/AppDelegate.swift index bfb375d..3bdaecb 100644 --- a/Swift/FlexGrid101/FlexGrid101/AppDelegate.swift +++ b/Swift/FlexGrid101/FlexGrid101/AppDelegate.swift @@ -1,22 +1,19 @@ // -// AppDelegate.swift +// AppDelegate.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniCoreKit +import XuniCoreDynamicKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? - - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { // Override point for customization after application launch. - XuniLicenseManager.setKey(License().key) + XuniLicenseManager.setKey(key) return true } @@ -41,7 +38,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - - } - +// +// AppDelegate.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib b/Swift/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib index d3eac8d..930cf10 100644 --- a/Swift/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib +++ b/Swift/FlexGrid101/FlexGrid101/Base.lproj/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - + diff --git a/Swift/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings b/Swift/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings index 12c8d18..f44cbc2 100644 --- a/Swift/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings +++ b/Swift/FlexGrid101/FlexGrid101/Base.lproj/Localizable.strings @@ -2,8 +2,7 @@ Localizable.strings FlexGrid101 - Created by Mykola Kotyuck on 27.11.15. - Copyright © 2015 GrapeCity. All rights reserved. + Copyright (c) 2015 GrapeCity. All rights reserved. */ "On Demand Loading" = "On Demand Loading"; @@ -45,4 +44,11 @@ "Total" = "Total"; "Count" = "Count"; "Edit Columns" = "Edit Columns"; -"Done" = "Done"; \ No newline at end of file +"Done" = "Done"; +"Monday" = "Monday"; +"Tuesday" = "Tuesday"; +"Wednesday" = "Wednesday"; +"Thursday" = "Thursday"; +"Friday" = "Friday"; +"Saturday" = "Saturday"; +"Sunday" = "Sunday"; \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard b/Swift/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard index 649d8c3..a6a5263 100644 --- a/Swift/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard +++ b/Swift/FlexGrid101/FlexGrid101/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - + - + + + @@ -16,33 +18,44 @@ + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + @@ -56,15 +69,15 @@ - + - + - + - - + + @@ -98,10 +111,9 @@ - - + @@ -109,19 +121,19 @@ - - - + + + - + - + @@ -129,13 +141,28 @@ + + + + + + + + + + + + + + + - + @@ -148,13 +175,27 @@ - + + + + + + + + + + + + + + + - + @@ -167,15 +208,30 @@ + + + + + + + + + + + + + + + - + - + @@ -186,36 +242,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + - - + + - + - - + + - - + + + + + + + + + + + + + + - + - + - + @@ -228,13 +352,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -247,18 +399,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + @@ -266,13 +457,27 @@ - + + + + + + + + + + + + + + + - + @@ -285,13 +490,33 @@ + + + + + + + + + + + + + + + + + + + + - + @@ -304,13 +529,28 @@ + + + + + + + + + + + + + + + - + @@ -323,14 +563,34 @@ + + + + + + + + + + + + + + + + + + + + - + @@ -344,6 +604,10 @@ + + + + @@ -658,9 +934,9 @@ - + - + @@ -672,13 +948,17 @@ - + + + + + - + @@ -701,20 +981,26 @@ + + + + - + + - + + - + @@ -729,7 +1015,7 @@ - + @@ -742,7 +1028,7 @@ - + @@ -755,13 +1041,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -794,7 +1124,7 @@ - + @@ -847,7 +1177,7 @@ - + @@ -900,7 +1230,7 @@ - + @@ -953,7 +1283,7 @@ - + @@ -1006,7 +1336,7 @@ - + @@ -1059,7 +1389,7 @@ - + @@ -1112,7 +1442,7 @@ - + @@ -1165,7 +1495,7 @@ - + @@ -1218,7 +1548,7 @@ - + @@ -1271,7 +1601,7 @@ - + @@ -1324,7 +1654,7 @@ - + @@ -1377,7 +1707,7 @@ - + @@ -1430,7 +1760,7 @@ - + @@ -1483,7 +1813,7 @@ - + @@ -1536,7 +1866,7 @@ - + @@ -1585,11 +1915,64 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1665,27 +2048,89 @@ - - + + + + + + + + + + + + + + + + + + - + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1696,6 +2141,7 @@ + @@ -1703,7 +2149,4 @@ - - - diff --git a/Swift/FlexGrid101/FlexGrid101/ColumnDefinitionsController.swift b/Swift/FlexGrid101/FlexGrid101/ColumnDefinitionsController.swift new file mode 100644 index 0000000..065fec5 --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/ColumnDefinitionsController.swift @@ -0,0 +1,64 @@ +// +// ColumnDefinitionsController.h +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// +import UIKit +import XuniFlexGridDynamicKit + +class ColumnDefinitionsController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.autoGenerateColumns = false + let active: GridColumn = GridColumn() + active.binding = "active" + active.widthType = GridColumnWidth.Pixel + active.width = 70 + self.flex.columns.addObject(active) + let identifier: GridColumn = GridColumn() + identifier.binding = "customerID" + identifier.isReadOnly = true + identifier.widthType = GridColumnWidth.Pixel + identifier.width = 100 + self.flex.columns.addObject(identifier) + let firstName: GridColumn = GridColumn() + firstName.binding = "firstName" + let lastName: GridColumn = GridColumn() + lastName.binding = "lastName" + self.flex.columns.addObject(lastName) + let orderTotal: GridColumn = GridColumn() + orderTotal.binding = "orderTotal" + orderTotal.format = "C2" + self.flex.columns.addObject(orderTotal) + let countryID: GridColumn = GridColumn() + countryID.binding = "countryID" + countryID.header = "Country" + countryID.horizontalAlignment = .Left + let items = CustomerData.defaultCountries() + countryID.dataMap = GridDataMap(array: items, selectedValuePath: "identifier", displayMemberPath: "title") + self.flex.columns.addObject(countryID) + let lastOrderDate: GridColumn = GridColumn() + lastOrderDate.binding = "lastOrderDate" + self.flex.columns.addObject(lastOrderDate) + let lastOrderTime: GridColumn = GridColumn() + lastOrderTime.binding = "lastOrderDate" + lastOrderTime.header = "Last Order Time" + let datefmt: NSDateFormatter = NSDateFormatter() + datefmt.dateFormat = "hh:mm a" + lastOrderTime.formatter = datefmt + self.flex.columns.addObject(lastOrderTime) + self.flex.itemsSource = NSMutableArray(array: CustomerData.getCustomerData(100)) + self.flex.isReadOnly = false + } + + @IBOutlet weak var flex: FlexGrid! +} +// +// ColumnDefinitionsController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/ColumnLayoutController.swift b/Swift/FlexGrid101/FlexGrid101/ColumnLayoutController.swift index 53862e9..7cb8956 100644 --- a/Swift/FlexGrid101/FlexGrid101/ColumnLayoutController.swift +++ b/Swift/FlexGrid101/FlexGrid101/ColumnLayoutController.swift @@ -1,72 +1,80 @@ -import Foundation +// +// ColumnLayoutController.h +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit class ColumnLayoutController: UIViewController { - var flex: FlexGrid! = nil - var editButton: UIBarButtonItem! = nil + @IBOutlet weak var flex: FlexGrid! + var editButton: UIBarButtonItem! + var restoreButton: UIBarButtonItem! + var columnsInitial: GridColumnCollection! + override func viewDidLoad() { - columnLayoutController = self super.viewDidLoad() - editButton = UIBarButtonItem(title: NSLocalizedString("Edit Columns", comment: ""), style: .Plain, target: self, - action: "editColumns:") - self.navigationItem.rightBarButtonItem = editButton + editButton = UIBarButtonItem(title: NSLocalizedString("Edit Columns", comment:""), style: .Plain, target: self, action: #selector(editColumns(_:))) + restoreButton = UIBarButtonItem(title: NSLocalizedString("Restore", comment:""), style: .Plain, target: self, action: #selector(restoreColumns(_:))) + self.navigationItem.rightBarButtonItems = [editButton] self.columnList.hidden = true - self.flex = FlexGrid() - self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(flex.columnHeaderFont.pointSize) + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) self.flex.isReadOnly = true - self.flex.itemsSource = CustomerData.getCustomerData(100) - self.flex.tag = 1 - flex.autoSizeColumns(0, to: Int32(flex.columns.count) - 1) - view.addSubview(flex) - view.sendSubviewToBack(flex) + self.flex.itemsSource = NSMutableArray(array: CustomerData.getCustomerData(100)) + columnsInitial = GridColumnCollection() + for i: UInt in 0 ..< self.flex.columns.count { + columnsInitial.addObject(self.flex.columns![Int32(i)]) + } + self.flex.autoSizeColumns(0, to: Int32(self.flex.columns.count - 1)) } func beginEditing() { - columnReorderTable.tableView.reloadData() + (self.childViewControllers.first as! ColumnReordererTableViewController).tableView.reloadData() self.columnList.alpha = 0 self.columnList.hidden = false UIView.animateWithDuration(0.7, animations: {() -> Void in self.columnList.alpha = 1 }, completion: {(finished: Bool) -> Void in }) - editButton.title = NSLocalizedString("Done", comment: "") + editButton.title = NSLocalizedString("Done",comment: "") + self.navigationItem.rightBarButtonItems = [editButton, restoreButton] } - @IBOutlet weak var columnList: UIVisualEffectView! - func endEditing() { UIView.animateWithDuration(0.7, animations: {() -> Void in self.columnList.alpha = 0 }, completion: {(finished: Bool) -> Void in self.columnList.hidden = true }) - editButton.title = NSLocalizedString("Edit Columns", comment: "") + editButton.title = NSLocalizedString("Edit Columns",comment: "") + self.navigationItem.rightBarButtonItems = [editButton] + } + + @IBAction func restoreColumns(sender: AnyObject) { + self.flex.columns.removeAllObjects() + for i: UInt in 0 ..< columnsInitial.count { + self.flex.columns.addObject(columnsInitial![Int32(i)]) + } + (self.childViewControllers.first as! ColumnReordererTableViewController).tableView.reloadData() } @IBAction func editColumns(sender: AnyObject) { - if columnList.hidden { - beginEditing() + if self.columnList.hidden { + self.beginEditing() } else { - endEditing() + self.endEditing() } } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - if (self.navigationController == nil) {return;} - - let ss: CGFloat = UIApplication.sharedApplication().statusBarFrame.size.height + navigationController!.navigationBar.intrinsicContentSize().height - self.flex.frame = CGRectMake(0, ss, view.bounds.size.width, view.bounds.size.height - ss) - flex.setNeedsDisplay() - } + @IBOutlet weak var columnList: UIVisualEffectView! } - -var columnLayoutController: ColumnLayoutController! = nil \ No newline at end of file +// +// ColumnLayoutController.m +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.swift b/Swift/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.swift index 00ae9ab..535721a 100644 --- a/Swift/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.swift +++ b/Swift/FlexGrid101/FlexGrid101/ColumnReordererTableViewController.swift @@ -1,11 +1,16 @@ -import Foundation +// +// ColumnReordererTableViewController.h +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// + import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit class ColumnReordererTableViewController: UITableViewController { override func viewDidLoad() { - columnReorderTable = self super.viewDidLoad() self.editing = true } @@ -19,37 +24,41 @@ class ColumnReordererTableViewController: UITableViewController { } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - - if (columnLayoutController == nil) {return 0} - - let fg: FlexGrid! = columnLayoutController.flex + if self.parentViewController == nil + { + return 0 + } + let fg: FlexGrid! = (self.parentViewController as! ColumnLayoutController).flex + if fg == nil + { + return 0 + } return Int(fg.columns.count) } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier("CELL", forIndexPath: indexPath) - let fg: FlexGrid = columnLayoutController.flex - let col: FlexColumn = fg.columns.objectAtIndex(UInt(indexPath.row)) as! FlexColumn + let fg: FlexGrid = (self.parentViewController as! ColumnLayoutController).flex + let col: GridColumn = fg.columns![Int32(indexPath.row)] as! GridColumn cell.textLabel!.text = col.header return cell } override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if editingStyle == .Delete { - let fg: FlexGrid = columnLayoutController.flex + let fg: FlexGrid = (self.parentViewController as! ColumnLayoutController).flex fg.columns.removeObjectAtIndex(UInt(indexPath.row)) tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) } - else { - if editingStyle == .Insert { + else if editingStyle == .Insert { - } } + } override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { - let fg: FlexGrid = columnLayoutController.flex - let fc: FlexColumn = fg.columns.objectAtIndex(UInt(fromIndexPath.row)) as! FlexColumn + let fg: FlexGrid = (self.parentViewController as! ColumnLayoutController).flex + let fc: GridColumn = fg.columns![Int32(fromIndexPath.row)] as! GridColumn fg.columns.removeObjectAtIndex(UInt(fromIndexPath.row)) fg.columns.insertObject(fc, atIndex: UInt(toIndexPath.row)) } @@ -58,6 +67,9 @@ class ColumnReordererTableViewController: UITableViewController { return true } } - - -var columnReorderTable: ColumnReordererTableViewController! = nil +// +// ColumnReordererTableViewController.m +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/ConditionalFormattingController.swift b/Swift/FlexGrid101/FlexGrid101/ConditionalFormattingController.swift index 18093e6..3489c6e 100644 --- a/Swift/FlexGrid101/FlexGrid101/ConditionalFormattingController.swift +++ b/Swift/FlexGrid101/FlexGrid101/ConditionalFormattingController.swift @@ -1,104 +1,100 @@ // -// ConditionalFormattingController.swift +// ConditionalFormattingController.h // FlexGrid101 // // Copyright © 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit + +class ConditionalFormattingController: UIViewController { -class ConditionalFormattingController: UIViewController, FlexGridDelegate { - var _flex = FlexGrid() - override func viewDidLoad() { super.viewDidLoad() - - _flex.autoGenerateColumns = false - let c1: FlexColumn = FlexColumn() + self.flex.autoGenerateColumns = false + let c1: GridColumn = GridColumn() c1.binding = "firstName" - c1.header = NSLocalizedString("First Name", comment: "") + c1.header = NSLocalizedString("First Name", comment:"") c1.width = 100 - let c2: FlexColumn = FlexColumn() + let c2: GridColumn = GridColumn() c2.binding = "lastName" - c2.header = NSLocalizedString("Last Name", comment: "") - let c3: FlexColumn = FlexColumn() + c2.header = NSLocalizedString("Last Name", comment:"") + let c3: GridColumn = GridColumn() c3.binding = "orderTotal" - c3.header = NSLocalizedString("Total", comment: "") + c3.header = NSLocalizedString("Total", comment:"") c3.format = "C" - let c4: FlexColumn = FlexColumn() + let c4: GridColumn = GridColumn() c4.binding = "orderCount" - c4.header = NSLocalizedString("Count", comment: "") + c4.header = NSLocalizedString("Count", comment:"") c4.format = "N1" - _flex.columns.addObject(c1) - _flex.columns.addObject(c2) - _flex.columns.addObject(c3) - _flex.columns.addObject(c4) - - - _flex.isReadOnly = true - _flex.itemsSource = CustomerData.getCustomerData(100) - - _flex.delegate = self - - self.view.addSubview(_flex) - } - - func formatItem(sender: FlexGrid!, panel: FlexGridPanel!, forRange range: FlexCellRange!, inContext context: CGContext!) -> Bool - { - if panel.cellType == FlexCellType.Cell { - let g: FlexGrid = _flex - let col: FlexColumn = g.columns.objectAtIndex(UInt(range.col)) as! FlexColumn - if col.binding == "orderCount" { - let n: Int? = panel.getCellDataForRow(range.row, inColumn: range.col, formatted: false) as? Int - if n != nil { - if n! >= 50 { - let r: CGRect = panel.getCellRectForRow(range.row, inColumn: range.col) - CGContextSetFillColorWithColor( - context, UIColor(red: 0.15, green: 0.31, blue: 0.07, alpha: 1.0).CGColor) - CGContextFillRect(context, r) - } - else { - if n! < 50 { - let r: CGRect = panel.getCellRectForRow(range.row, inColumn: range.col) - CGContextSetFillColorWithColor(context, UIColor.redColor().CGColor) - CGContextFillRect(context, r) + self.flex.columns.addObject(c1) + self.flex.columns.addObject(c2) + self.flex.columns.addObject(c3) + self.flex.columns.addObject(c4) + let countryID: GridColumn = GridColumn() + countryID.binding = "countryID" + countryID.header = "Country" + countryID.horizontalAlignment = .Left + let items = (array: CustomerData.defaultCountries()) + countryID.dataMap = GridDataMap(array: items, selectedValuePath: "identifier", displayMemberPath: "title") + self.flex.columns.addObject(countryID) + let lastOrderDate: GridColumn = GridColumn() + lastOrderDate.binding = "lastOrderDate" + self.flex.columns.addObject(lastOrderDate) + let lastOrderTime: GridColumn = GridColumn() + lastOrderTime.binding = "lastOrderDate" + lastOrderTime.header = "Last Order Time" + let datefmt: NSDateFormatter = NSDateFormatter() + datefmt.dateFormat = "hh:mm a" + lastOrderTime.formatter = datefmt + self.flex.columns.addObject(lastOrderTime) + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) + self.flex.flexGridFormatItem.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridFormatItemEventArgs + if eventContainerEventArgs.panel.cellType == GridCellType.Cell { + let g: FlexGrid! = self.flex + let col: GridColumn = g.columns![eventContainerEventArgs.col] as! GridColumn + if (col.binding == "orderCount") { + let n: NSNumber! = eventContainerEventArgs.panel.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false) as! NSNumber! + if n != nil { + if n.integerValue >= 50 { + let r: CGRect = eventContainerEventArgs.panel.getCellRectForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + CGContextSetFillColorWithColor(eventContainerEventArgs.context, UIColor(red: 0.15, green: 0.31, blue: 0.07, alpha: 1.0).CGColor) + CGContextFillRect(eventContainerEventArgs.context, r) } + else if n.integerValue < 50 { + let r: CGRect = eventContainerEventArgs.panel.getCellRectForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + CGContextSetFillColorWithColor(eventContainerEventArgs.context, UIColor.redColor().CGColor) + CGContextFillRect(eventContainerEventArgs.context, r) + } + + eventContainerEventArgs.panel.textAttributes[NSForegroundColorAttributeName] = UIColor.whiteColor() } - panel.textAttributes.setValue(UIColor.whiteColor(), forKey: NSForegroundColorAttributeName) } - } - if col.binding == "orderTotal" { - let n: Int? = panel.getCellDataForRow(range.row, inColumn: range.col, formatted: false) as? Int - if n != nil { - if n! >= 5000 { - panel.textAttributes.setValue(UIColor(red: 0.15, green: 0.31, blue: 0.07, alpha: 1.0), forKey: NSForegroundColorAttributeName) - } - else { - if n! < 5000 { - panel.textAttributes.setValue(UIColor.redColor(), forKey: NSForegroundColorAttributeName) + if (col.binding == "orderTotal") { + let n: NSNumber! = eventContainerEventArgs.panel.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false) as! NSNumber! + if n != nil { + if n.integerValue >= 5000 { + eventContainerEventArgs.panel.textAttributes[NSForegroundColorAttributeName] = UIColor(red: 0.15, green: 0.31, blue: 0.07, alpha: 1.0) + } + else if n.integerValue < 5000 { + eventContainerEventArgs.panel.textAttributes[NSForegroundColorAttributeName] = UIColor.redColor() } } } } - } - return false - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. + eventContainerEventArgs.cancel = false + }, forObject: self) } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - if (self.navigationController == nil) {return;} - - let ss = UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.intrinsicContentSize().height; - - _flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss) - _flex.setNeedsDisplay() - } - + @IBOutlet weak var flex: FlexGrid! } +// +// ConditionalFormattingController.m +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/CustomCellsController.swift b/Swift/FlexGrid101/FlexGrid101/CustomCellsController.swift index e803ac8..29aad4b 100644 --- a/Swift/FlexGrid101/FlexGrid101/CustomCellsController.swift +++ b/Swift/FlexGrid101/FlexGrid101/CustomCellsController.swift @@ -1,127 +1,96 @@ // -// CustomCellsController.swift +// CustomCellsController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit -import XuniGaugeKit -class CustomCellsController: UIViewController, FlexGridDelegate { +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit +import XuniGaugeDynamicKit + +class CustomCellsController: UIViewController { - var _flex = FlexGrid() - override func viewDidLoad() { super.viewDidLoad() - - // Do any additional setup after loading the view. - _flex.isReadOnly = true - _flex.delegate = self - _flex.autoGenerateColumns = false - let c1: FlexColumn = FlexColumn() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.autoGenerateColumns = false + self.flex.isReadOnly = true + self.flex.selectionMode = GridSelectionMode.Row + let c1: GridColumn = GridColumn() c1.header = NSLocalizedString("First Name", comment: "") c1.binding = "firstName" - let c2: FlexColumn = FlexColumn() + let c2: GridColumn = GridColumn() c2.header = NSLocalizedString("Last Name", comment: "") c2.binding = "lastName" - let c3: FlexColumn = FlexColumn() + let c3: GridColumn = GridColumn() c3.header = NSLocalizedString("Total Orders", comment: "") c3.binding = "orderTotal" - - _flex.columns.addObject(c1) - _flex.columns.addObject(c2) - _flex.columns.addObject(c3) - - _flex.selectionMode = FlexSelectionMode.None - - _flex.itemsSource = CustomerData.getCustomerData(100) - _flex.isReadOnly = true - self.starSizing(_flex) - self.view.addSubview(_flex) - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - func formatItem(sender: FlexGrid!, panel: FlexGridPanel!, forRange range: FlexCellRange!, inContext context: CGContext!) -> Bool { - let col = _flex.columns.objectAtIndex(UInt(range.col)) as! FlexColumn - if(col.header == NSLocalizedString("Total Orders", comment: "")){ - let v = panel.getCellDataForRow(range.row, inColumn: range.col, formatted: false) - if(v != nil){ - //check for column header... if not equal to header performance proceed - if(v.description != NSLocalizedString("Total Orders", comment: "")){ - let radialGauge = XuniRadialGauge() - let lower = XuniGaugeRange(gauge: radialGauge) - lower.min = 0 - lower.max = 40 - lower.color = UIColor(red: CGFloat(0.133), green: CGFloat(0.694), blue: CGFloat(0.298), alpha: CGFloat(1)) - let middle = XuniGaugeRange(gauge: radialGauge) - middle.min = 40 - middle.max = 80 - middle.color = UIColor(red: CGFloat(1), green: CGFloat(0.502), blue: CGFloat(0.502), alpha: CGFloat(1)) - var upper = XuniGaugeRange(gauge: radialGauge) - upper.min = 80 - upper.max = 100 - upper.color = UIColor(red: CGFloat(0), green: CGFloat(0.635), blue: CGFloat(0.91), alpha: CGFloat(1)) - - radialGauge.ranges.addObject(lower) - radialGauge.ranges.addObject(middle) - radialGauge.ranges.addObject(upper) - - radialGauge.showText = XuniShowText.None - radialGauge.thickness = 0.6 - radialGauge.min = 0 - radialGauge.max = 100 - radialGauge.loadAnimation = nil - radialGauge.value = Double(v.description)! * (100.0/90000.0); - radialGauge.showRanges = false - - var r : CGRect = panel.getCellRectForRow(range.row, inColumn: range.col) - - r.size.width-=4; - r.size.height-=4; - - r.origin.x+=2; - r.origin.y+=2; - - var t = XuniRect(left: 0.0, top: 0.0, width: Double(r.size.width), height: Double(r.size.height)) - radialGauge.rectGauge = t - radialGauge.frame = CGRectMake(0, 0, r.size.width, r.size.height) - - var image = UIImage() - image = UIImage(data: radialGauge.getImage())! - image.drawInRect(r) - return true + self.flex.columns.addObject(c1) + self.flex.columns.addObject(c2) + self.flex.columns.addObject(c3) + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) + self.starSizing(self.flex) + self.flex.flexGridFormatItem.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridFormatItemEventArgs + eventContainerEventArgs.cancel = false + let g: FlexGrid = self.flex + let col: GridColumn = g.columns![eventContainerEventArgs.col] as! GridColumn + if (col.binding == "orderTotal") { + let v: NSObject! = eventContainerEventArgs.panel.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false) + if v != nil { + if !v.description.isEqual(NSLocalizedString("Total Orders", comment:"")) { + let radialGauge: XuniRadialGauge = XuniRadialGauge() + let lower: XuniGaugeRange = XuniGaugeRange(gauge: radialGauge) + lower.min = 0 + lower.max = 40 + lower.color = UIColor(red: 0.133, green: 0.694, blue: 0.298, alpha: 1) + let middle: XuniGaugeRange = XuniGaugeRange(gauge: radialGauge) + middle.min = 40 + middle.max = 80 + middle.color = UIColor(red: 1, green: 0.502, blue: 0.502, alpha: 1) + let upper: XuniGaugeRange = XuniGaugeRange(gauge: radialGauge) + upper.min = 80 + upper.max = 100 + upper.color = UIColor(red: 0, green: 0.635, blue: 0.91, alpha: 1) + radialGauge.ranges.addObject(lower) + radialGauge.ranges.addObject(middle) + radialGauge.ranges.addObject(upper) + radialGauge.backgroundColor = UIColor.clearColor() + radialGauge.showText = XuniShowText.None + radialGauge.thickness = 0.6 + radialGauge.min = 0 + radialGauge.max = 100 + radialGauge.loadAnimation = nil + radialGauge.value = CDouble(v.description)! * (100.0 / 90000.0) + radialGauge.showRanges = false + let r: CGRect = eventContainerEventArgs.panel.getCellRectForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + let t: XuniRect = XuniRect(left: 0, top: 0, width: Double(r.size.width), height: Double(r.size.height)) + radialGauge.rectGauge = t + radialGauge.frame = CGRectMake(0, 0, r.size.width, r.size.height) + var image: UIImage = UIImage() + image = UIImage(data: radialGauge.getImage())! + image.drawInRect(r) + eventContainerEventArgs.cancel = true } + } } - } - return false - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - _flex.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65) - _flex.setNeedsDisplay() + }, forObject: self) } - func starSizing(g: FlexGrid){ - for var i : UInt = 0; i < g.columns.count; i++ { - var c = FlexColumn() - c = g.columns.objectAtIndex(i) as! FlexColumn - c.widthType = FlexColumnWidth.Star + + func starSizing(g: FlexGrid) { + for i:UInt in 0 ..< g.columns.count { + let c: GridColumn = g.columns![Int32(i)] as! GridColumn + c.widthType = GridColumnWidth.Star c.width = (i == 0) ? 5 : (i == 3) ? 3 : 4 } } - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. - } - */ + @IBOutlet weak var flex: FlexGrid! } +// +// CustomCellsController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/CustomMergingViewController.swift b/Swift/FlexGrid101/FlexGrid101/CustomMergingViewController.swift index 2428641..c225b1d 100644 --- a/Swift/FlexGrid101/FlexGrid101/CustomMergingViewController.swift +++ b/Swift/FlexGrid101/FlexGrid101/CustomMergingViewController.swift @@ -1,53 +1,53 @@ // -// CustomMergingViewController.swift +// CustomMergingViewController.h // FlexGrid101 // // Copyright © 2016 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit class CustomMergingViewController: UIViewController { - @IBOutlet weak var grid: FlexGrid! - @IBOutlet weak var showTitle: UILabel! - @IBOutlet weak var showTimetable: UILabel! override func viewDidLoad() { super.viewDidLoad() - self.grid.selectionMode = FlexSelectionMode.Cell + self.grid.selectionMode = GridSelectionMode.Cell self.grid.isReadOnly = true - + self.grid.columnHeaderFont = UIFont.boldSystemFontOfSize(self.grid.columnHeaderFont.pointSize) let weekdays: [String] = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] for dayName: String in weekdays { - let c1: FlexColumn = FlexColumn() + let c1: GridColumn = GridColumn() c1.header = dayName - c1.widthType = FlexColumnWidth.Star + c1.widthType = GridColumnWidth.Star c1.width = 1 c1.dataType = XuniDataType.String c1.minWidth = 120 + c1.horizontalAlignment = .Center + c1.headerHorizontalAlignment = .Center c1.allowMerging = true self.grid.columns.addObject(c1) } - let timespans: [String] = ["12", "13", "14", "15", "16", "17", "18"] for timeSpan: String in timespans { - let r1: FlexRow = FlexRow() + let r1: GridRow = GridRow() self.grid.rows.addObject(r1) self.grid.rowHeaders.setCellData("\(timeSpan):00", forRow: Int32(self.grid.rows.indexOfObject(r1)), inColumn: 0) } - self.grid.flexGridSelectionChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in - let e: FlexCellRangeEventArgs = (args as! FlexCellRangeEventArgs) - let r: Int32 = e.row - let c: Int32 = e.col + + self.grid.flexGridSelectionChanged.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridCellRangeEventArgs + + let r = eventContainerEventArgs.row + let c = eventContainerEventArgs.col + let thisShow: String = self.grid.getCellDataForRow(r, inColumn: c, formatted: true).description self.showTitle.text = thisShow var timetable: String = "" - for var cc = 0; cc < 7; cc++ { - let day: String = ((self.grid.columns.objectAtIndex(UInt(cc)) as! FlexColumn)).header + for cc in 0 ..< 7 { + let day: String = (self.grid.columns.objectAtIndex(UInt(cc)) as! GridColumn).header var spanStart: String? = nil var spanEnd: String? = nil - for var cr = 0; cr < 7; cr++ { + for cr in 0 ..< 7 { let candidate: String = self.grid.getCellDataForRow(Int32(cr), inColumn: Int32(cc), formatted: true).description if (candidate == thisShow) { if spanStart == nil { @@ -68,8 +68,17 @@ class CustomMergingViewController: UIViewController { } } self.showTimetable.text = timetable - }, forObject: self) + }, forObject: self) + self.grid.columnHeaders.rows.insertObject(GridRow(), atIndex: 0) + (self.grid.columnHeaders.rows.objectAtIndex(0) as! GridRow).allowMerging = true + self.grid.columnHeaders[0][0] = "Weekday" + self.grid.columnHeaders[0][1] = "Weekday" + self.grid.columnHeaders[0][2] = "Weekday" + self.grid.columnHeaders[0][3] = "Weekday" + self.grid.columnHeaders[0][4] = "Weekday" + self.grid.columnHeaders[0][5] = "Weekend" + self.grid.columnHeaders[0][6] = "Weekend" self.grid.setCellData("Walker", forRow: 0, inColumn: 0) self.grid.setCellData("Morning Show", forRow: 0, inColumn: 1) self.grid.setCellData("Morning Show", forRow: 0, inColumn: 2) @@ -105,9 +114,9 @@ class CustomMergingViewController: UIViewController { self.grid.setCellData("News", forRow: 4, inColumn: 2) self.grid.setCellData("News", forRow: 4, inColumn: 3) self.grid.setCellData("News", forRow: 4, inColumn: 4) - self.grid.setCellData("Weel of Fortune", forRow: 5, inColumn: 0) - self.grid.setCellData("Weel of Fortune", forRow: 5, inColumn: 1) - self.grid.setCellData("Weel of Fortune", forRow: 5, inColumn: 2) + self.grid.setCellData("Wheel of Fortune", forRow: 5, inColumn: 0) + self.grid.setCellData("Wheel of Fortune", forRow: 5, inColumn: 1) + self.grid.setCellData("Wheel of Fortune", forRow: 5, inColumn: 2) self.grid.setCellData("Jeopardy", forRow: 5, inColumn: 3) self.grid.setCellData("Jeopardy", forRow: 5, inColumn: 4) self.grid.setCellData("Movie", forRow: 5, inColumn: 5) @@ -119,15 +128,103 @@ class CustomMergingViewController: UIViewController { self.grid.setCellData("Sports", forRow: 6, inColumn: 2) self.grid.setCellData("Big Brother", forRow: 6, inColumn: 3) self.grid.setCellData("Big Brother", forRow: 6, inColumn: 4) - - self.grid.allowMerging = FlexGridAllowMerging.Cells + self.grid.allowMerging = GridAllowMerging.All self.grid.autoSizeColumn(0, header: true) } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - } - + @IBOutlet weak var grid: FlexGrid! + @IBOutlet weak var showTitle: UILabel! + @IBOutlet weak var showTimetable: UILabel! +} +// +// CustomMergingViewController.m +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// +class CustomMergingFlexGrid: FlexGrid { -} + override func prepareForInterfaceBuilder() { + self.columnHeaderFont = UIFont.boldSystemFontOfSize(self.columnHeaderFont.pointSize) + let weekdays: [String] = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] + for dayName: String in weekdays { + let c1: GridColumn = GridColumn() + c1.header = dayName + c1.widthType = GridColumnWidth.Star + c1.width = 1 + c1.dataType = XuniDataType.String + c1.minWidth = 120 + c1.horizontalAlignment = .Center + c1.headerHorizontalAlignment = .Center + c1.allowMerging = true + self.columns.addObject(c1) + } + let timespans: [String] = ["12", "13", "14", "15", "16", "17", "18"] + for timeSpan: String in timespans { + let r1: GridRow = GridRow() + self.rows.addObject(r1) + self.rowHeaders.setCellData("\(timeSpan):00", forRow: Int32(self.rows.indexOfObject(r1)), inColumn: 0) + } + self.columnHeaders.rows.insertObject(GridRow(), atIndex: 0) + (self.columnHeaders.rows.objectAtIndex(0) as! GridRow).allowMerging = true + self.columnHeaders[0][0] = "Weekday" + self.columnHeaders[0][1] = "Weekday" + self.columnHeaders[0][2] = "Weekday" + self.columnHeaders[0][3] = "Weekday" + self.columnHeaders[0][4] = "Weekday" + self.columnHeaders[0][5] = "Weekend" + self.columnHeaders[0][6] = "Weekend" + self.setCellData("Walker", forRow: 0, inColumn: 0) + self.setCellData("Morning Show", forRow: 0, inColumn: 1) + self.setCellData("Morning Show", forRow: 0, inColumn: 2) + self.setCellData("Sports", forRow: 0, inColumn: 3) + self.setCellData("Weather", forRow: 0, inColumn: 4) + self.setCellData("N/A", forRow: 0, inColumn: 5) + self.setCellData("N/A", forRow: 0, inColumn: 6) + self.setCellData("N/A", forRow: 1, inColumn: 5) + self.setCellData("N/A", forRow: 1, inColumn: 6) + self.setCellData("N/A", forRow: 2, inColumn: 5) + self.setCellData("N/A", forRow: 2, inColumn: 6) + self.setCellData("N/A", forRow: 3, inColumn: 5) + self.setCellData("N/A", forRow: 3, inColumn: 6) + self.setCellData("N/A", forRow: 4, inColumn: 5) + self.setCellData("N/A", forRow: 4, inColumn: 6) + self.setCellData("Today Show", forRow: 1, inColumn: 0) + self.setCellData("Today Show", forRow: 1, inColumn: 1) + self.setCellData("Today Show", forRow: 2, inColumn: 0) + self.setCellData("Today Show", forRow: 2, inColumn: 1) + self.setCellData("Sesame Street", forRow: 1, inColumn: 2) + self.setCellData("Football", forRow: 1, inColumn: 3) + self.setCellData("Football", forRow: 2, inColumn: 3) + self.setCellData("Market Watch", forRow: 1, inColumn: 4) + self.setCellData("Kids Zone", forRow: 2, inColumn: 2) + self.setCellData("Soap Opera", forRow: 2, inColumn: 4) + self.setCellData("News", forRow: 3, inColumn: 0) + self.setCellData("News", forRow: 3, inColumn: 1) + self.setCellData("News", forRow: 3, inColumn: 2) + self.setCellData("News", forRow: 3, inColumn: 3) + self.setCellData("News", forRow: 3, inColumn: 4) + self.setCellData("News", forRow: 4, inColumn: 0) + self.setCellData("News", forRow: 4, inColumn: 1) + self.setCellData("News", forRow: 4, inColumn: 2) + self.setCellData("News", forRow: 4, inColumn: 3) + self.setCellData("News", forRow: 4, inColumn: 4) + self.setCellData("Weel of Fortune", forRow: 5, inColumn: 0) + self.setCellData("Weel of Fortune", forRow: 5, inColumn: 1) + self.setCellData("Weel of Fortune", forRow: 5, inColumn: 2) + self.setCellData("Jeopardy", forRow: 5, inColumn: 3) + self.setCellData("Jeopardy", forRow: 5, inColumn: 4) + self.setCellData("Movie", forRow: 5, inColumn: 5) + self.setCellData("Movie", forRow: 6, inColumn: 5) + self.setCellData("Golf", forRow: 5, inColumn: 6) + self.setCellData("Golf", forRow: 6, inColumn: 6) + self.setCellData("Night Show", forRow: 6, inColumn: 0) + self.setCellData("Night Show", forRow: 6, inColumn: 1) + self.setCellData("Sports", forRow: 6, inColumn: 2) + self.setCellData("Big Brother", forRow: 6, inColumn: 3) + self.setCellData("Big Brother", forRow: 6, inColumn: 4) + self.allowMerging = GridAllowMerging.All + self.autoSizeColumn(0, header: true) + } +} \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/CustomerData.swift b/Swift/FlexGrid101/FlexGrid101/CustomerData.swift index 22e4eea..e31ca74 100644 --- a/Swift/FlexGrid101/FlexGrid101/CustomerData.swift +++ b/Swift/FlexGrid101/FlexGrid101/CustomerData.swift @@ -1,27 +1,50 @@ // -// CustomerData.swift +// CustomerData.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - -import UIKit - +import Foundation +class CountryPair: NSObject { + var title: String + var identifier: Int + + override init() + { + title = "" + identifier = 0 + super.init() + } +} class CustomerData: NSObject { var customerID: Int - var firstName, lastName: String - var address, postalCode, country: String + var firstName: String + var lastName: String + var name: String { + get { + return "\(self.firstName) \(self.lastName)" + } + } + + var address: String var city: String var countryID: Int + var country: String + var postalCode: String var email: String var lastOrderDate: NSDate var orderCount: Int var orderTotal: Double + var orderAverage: Double { + get { + return self.orderTotal / (Double(self.orderCount)) + } + } + var active: Bool - private override init() + override init() { - self.customerID = 0 self.countryID = 0 self.firstName = "" @@ -33,47 +56,34 @@ class CustomerData: NSObject { self.postalCode = "" self.lastOrderDate = NSDate() self.orderCount = 0 - self.orderTotal = 0.0 + self.orderTotal = 0 self.email = "" super.init() } - - init(customerID: Int, countryID: Int, firstName first: String, lastName last: String, address: String, city: String, country: String, postalCode: String, email: String, lastOrderDate: NSDate, orderCount: Int, orderTotal: Double, active: Bool){ - self.customerID = customerID - self.countryID = countryID - self.firstName = first - self.lastName = last - self.active = active - self.address = address - self.city = city - self.country = country - self.postalCode = postalCode - self.lastOrderDate = lastOrderDate - self.orderCount = orderCount - self.orderTotal = orderTotal - self.email = email - } - - class func generateRandomBool() -> Bool{ - let random = (Int(arc4random_uniform(UInt32(RAND_MAX)))) - if (random % 5 == 0) { - return true - } - else{ - return false - } - } - - class func generateRandom(max: Int) -> Int{ - return (Int(arc4random_uniform(UInt32(max)))) + + init(customerID: Int, countryID: Int, firstName first: String, lastName last: String, address: String, city: String, country: String, postalCode: String, lastOrderDate: NSDate, orderCount: Int, orderTotal: Double, active: Bool) { + + self.customerID = customerID + self.countryID = countryID + self.firstName = first + self.lastName = last + self.active = active + self.address = address + self.city = city + self.country = country + self.postalCode = postalCode + self.lastOrderDate = lastOrderDate + self.orderCount = orderCount + self.orderTotal = orderTotal + self.email = "" + super.init() } - - class func getCustomerData(total: Int) -> NSMutableArray{ + class func getCustomerData(total: Int) -> [CustomerData] { let firstNames: String = "Andy|Ben|Charlie|Dan|Ed|Fred|Gil|Herb|Jack|Karl|Larry|Mark|Noah|Oprah|Paul|Quince|Rich|Steve|Ted|Ulrich|Vic|Xavier|Zeb" - var firstNamesArray: [AnyObject] = firstNames.componentsSeparatedByString("|") + let firstNamesArray: [AnyObject] = firstNames.componentsSeparatedByString("|") let lastNames: String = "Ambers|Bishop|Cole|Danson|Evers|Frommer|Griswold|Heath|Jammers|Krause|Lehman|Myers|Neiman|Orsted|Paulson|Quaid|Richards|Stevens|Trask|Ulam" - var lastNamesArray: [AnyObject] = lastNames.componentsSeparatedByString("|") + let lastNamesArray: [AnyObject] = lastNames.componentsSeparatedByString("|") let countries: String = "China|India|United States|Indonesia|Brazil|Pakistan|Bangladesh|Nigeria|Russia|Japan|Mexico|Philippines|Vietnam|Germany|Ethiopia|Egypt|Iran|Turkey|Congo|France|Thailand|United Kingdom|Italy|Myanmar" var countriesArray: [AnyObject] = countries.componentsSeparatedByString("|") let cities: String = "Honolulu|Los Angeles|San Francisco|Las Vegas|Cancun|Chicago|New York|San Paolo|Miami|Dublin|London|Paris|Addis-Abeba|St. Petersburg|Frankfurt|Istanbul|Isfahan|Cairo|Milano|New Delhi|Bangalor|Mumbai|Dhaka|Tokyo|Osaka|Bangkok|Yangon|Manila" @@ -86,28 +96,53 @@ class CustomerData: NSObject { var previousDate: NSDate let dateComps: NSDateComponents = NSDateComponents() let calendar: NSCalendar = NSCalendar.currentCalendar() - let array: NSMutableArray = NSMutableArray() - for var i = 0; i < total; i++ { - dateComps.day = (Int(CustomerData.generateRandom(1000)) * -1) - previousDate = calendar.dateByAddingComponents(dateComps, toDate: now, options: NSCalendarOptions(rawValue: 0))! + var array: [CustomerData] = [CustomerData]() + for i in 0 ..< total { + dateComps.second = (CustomerData.generateRandom(100000000) * -1) + previousDate = calendar.dateByAddingComponents(dateComps, toDate: now, options:NSCalendarOptions())! let customer: CustomerData = CustomerData() customer.customerID = i customer.countryID = CustomerData.generateRandom(countriesArray.count) - customer.country = String(countriesArray[Int(customer.countryID)]) + customer.country = countriesArray[customer.countryID] as! String customer.firstName = firstNamesArray[CustomerData.generateRandom(firstNamesArray.count)] as! String customer.lastName = lastNamesArray[CustomerData.generateRandom(lastNamesArray.count)] as! String customer.city = citiesArray[CustomerData.generateRandom(citiesArray.count)] as! String - customer.address = streetsArray[CustomerData.generateRandom(streetsArray.count)] as! String + customer.address = "\(Int(CustomerData.generateRandom(500))) \(streetsArray[CustomerData.generateRandom(streetsArray.count)])" customer.postalCode = "\(self.generateRandom(9))\(self.generateRandom(9))\(self.generateRandom(9))\(self.generateRandom(9))\(self.generateRandom(9))" customer.lastOrderDate = previousDate customer.email = emailsArray[CustomerData.generateRandom(emailsArray.count)] as! String - customer.orderCount = self.generateRandom(100) + customer.orderCount = self.generateRandom(100) + 1 customer.orderTotal = Double(self.generateRandom(100)) / 100.0 + Double(self.generateRandom(90000)) customer.active = CustomerData.generateRandomBool() - array.addObject(customer) + array.append(customer) } return array - } -} + class func defaultCountries() -> [CountryPair] { + let countries: String = "China|India|United States|Indonesia|Brazil|Pakistan|Bangladesh|Nigeria|Russia|Japan|Mexico|Philippines|Vietnam|Germany|Ethiopia|Egypt|Iran|Turkey|Congo|France|Thailand|United Kingdom|Italy|Myanmar" + let countriesArray: [String] = countries.componentsSeparatedByString("|") + var result: [CountryPair] = [CountryPair]() + for country: String in countriesArray { + let pair: CountryPair = CountryPair() + pair.title = country + pair.identifier = countriesArray.indexOf(country)! + result.append(pair) + } + return result + } + + class func generateRandomBool() -> Bool{ + let random = (Int(arc4random_uniform(UInt32(RAND_MAX)))) + if (random % 5 == 0) { + return true + } + else{ + return false + } + } + + class func generateRandom(max: Int) -> Int{ + return (Int(arc4random_uniform(UInt32(max)))) + } +} \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/CustomerObjectEditor.swift b/Swift/FlexGrid101/FlexGrid101/CustomerObjectEditor.swift index 8ea4b17..284f786 100644 --- a/Swift/FlexGrid101/FlexGrid101/CustomerObjectEditor.swift +++ b/Swift/FlexGrid101/FlexGrid101/CustomerObjectEditor.swift @@ -1,67 +1,63 @@ -import Foundation +// +// CustomerObjectEditor.h +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// import UIKit -import XuniFlexGridKit - class CustomerObjectEditor: UITableViewController { - - - @IBOutlet weak var firstNameEdit: UITextField! - @IBOutlet weak var secondNameEdit: UITextField! - @IBOutlet weak var countryEdit: UITextField! - @IBOutlet weak var cityEdit: UITextField! - @IBOutlet weak var emailEdit: UITextField! - @IBOutlet weak var addressEdit: UITextField! - func initObject() { - self.firstNameEdit.text = edited.firstName - self.secondNameEdit.text = edited.lastName - self.countryEdit.text = edited.country - self.cityEdit.text = edited.city - self.addressEdit.text = edited.address - self.emailEdit.text = edited.email - self.firstNameEdit.placeholder = firstNameEdit.text - self.secondNameEdit.placeholder = secondNameEdit.text - self.countryEdit.placeholder = countryEdit.text - self.cityEdit.placeholder = cityEdit.text - self.addressEdit.placeholder = addressEdit.text - self.emailEdit.placeholder = emailEdit.text + let efc: EditingFormController = (self.parentViewController as! EditingFormController) + self.firstNameEdit.text = efc.edited.firstName + self.secondNameEdit.text = efc.edited.lastName + self.countryEdit.text = efc.edited.country + self.cityEdit.text = efc.edited.city + self.addressEdit.text = efc.edited.address + self.emailEdit.text = efc.edited.email + self.firstNameEdit.placeholder = self.firstNameEdit.text! + self.secondNameEdit.placeholder = self.secondNameEdit.text! + self.countryEdit.placeholder = self.countryEdit.text! + self.cityEdit.placeholder = self.cityEdit.text! + self.addressEdit.placeholder = self.addressEdit.text! + self.emailEdit.placeholder = self.emailEdit.text! } override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { cell.backgroundColor = UIColor.clearColor() } - override func viewDidLoad() { - super.viewDidLoad() - objEdit = self - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - } - override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { - if indexPath.row == tableView.numberOfRowsInSection(indexPath.section) - 2 { + let efc: EditingFormController = (self.parentViewController as! EditingFormController) + if indexPath.row == self.tableView(tableView, numberOfRowsInSection: indexPath.section) - 2 { efc.cancel() } - else { - if indexPath.row == tableView.numberOfRowsInSection(indexPath.section) - 3 - { - edited.firstName = objEdit.firstNameEdit.text! - edited.lastName = objEdit.secondNameEdit.text! - edited.country = objEdit.countryEdit.text! - edited.city = objEdit.cityEdit.text! - edited.address = objEdit.addressEdit.text! - edited.email = objEdit.emailEdit.text! - efc.confirm() - } + else if indexPath.row == self.tableView(tableView, numberOfRowsInSection: indexPath.section) - 3 { + efc.edited.firstName = self.firstNameEdit.text! + efc.edited.lastName = self.secondNameEdit.text! + efc.edited.country = self.countryEdit.text! + efc.edited.city = self.cityEdit.text! + efc.edited.address = self.addressEdit.text! + efc.edited.email = self.emailEdit.text! + efc.confirm() } - tableView.deselectRowAtIndexPath(indexPath, animated: false) + + self.tableView.deselectRowAtIndexPath(indexPath, animated: false) } @IBAction func endEdit(sender: AnyObject) { - resignFirstResponder() + self.resignFirstResponder() } -} -var objEdit: CustomerObjectEditor! = nil \ No newline at end of file + @IBOutlet weak var firstNameEdit: UITextField! + @IBOutlet weak var secondNameEdit: UITextField! + @IBOutlet weak var countryEdit: UITextField! + @IBOutlet weak var cityEdit: UITextField! + @IBOutlet weak var addressEdit: UITextField! + @IBOutlet weak var emailEdit: UITextField! +} +// +// CustomerObjectEditor.m +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/EditConfirmationController.swift b/Swift/FlexGrid101/FlexGrid101/EditConfirmationController.swift index 5cc127d..070dd77 100644 --- a/Swift/FlexGrid101/FlexGrid101/EditConfirmationController.swift +++ b/Swift/FlexGrid101/FlexGrid101/EditConfirmationController.swift @@ -1,74 +1,83 @@ // -// EditConfirmationController.swift +// EditConfirmationController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit -class EditConfirmationController: UIViewController, FlexGridDelegate { +class EditConfirmationController: UIViewController { - var _flex = FlexGrid() - var _temp = NSObject() - override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. - _flex.isReadOnly = false - _flex.delegate = self - _flex.itemsSource = CustomerData.getCustomerData(100) - _flex.columns.removeObjectAtIndex(1) - self.view.addSubview(_flex) - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - _flex.frame = CGRectMake(0, 65, self.view.bounds.size.width, self.view.bounds.size.height - 65) - _flex.setNeedsDisplay() - } - - func beginningEdit(sender: FlexGrid!, panel: FlexGridPanel!, forRange range: FlexCellRange!) -> Bool { - _temp = _flex.cells.getCellDataForRow(range.row, inColumn: range.col, formatted: false) - return false - } - - func cellEditEnding(sender: FlexGrid!, panel: FlexGridPanel!, forRange range: FlexCellRange!, cancel: Bool) -> Bool { + self.flex.isReadOnly = false + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.autoGenerateColumns = false + let identifier: GridColumn = GridColumn() + identifier.binding = "customerID" + identifier.isReadOnly = true + identifier.widthType = GridColumnWidth.Pixel + identifier.width = 100 + self.flex.columns.addObject(identifier) + let firstName: GridColumn = GridColumn() + firstName.binding = "firstName" + self.flex.columns.addObject(firstName) + let lastName: GridColumn = GridColumn() + lastName.binding = "lastName" + self.flex.columns.addObject(lastName) + let address: GridColumn = GridColumn() + address.binding = "address" + self.flex.columns.addObject(address) + let city: GridColumn = GridColumn() + city.binding = "city" + self.flex.columns.addObject(city) + let postalCode: GridColumn = GridColumn() + postalCode.binding = "postalCode" + self.flex.columns.addObject(postalCode) + let active: GridColumn = GridColumn() + active.binding = "active" + active.widthType = GridColumnWidth.Pixel + active.width = 70 + self.flex.columns.addObject(active) + - dispatch_async(dispatch_get_main_queue()) { () -> Void in + self.flex.itemsSource = NSMutableArray(array: CustomerData.getCustomerData(100)) + + self.flex.flexGridCellEditEnding.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs : GridCellRangeEventArgs = eventContainer.eventArgs as! GridCellRangeEventArgs - if(self._flex.cells.getCellDataForRow(range.row, inColumn: range.col, formatted: false).isEqual(self._temp)) - { - return; + var activeEditorValue: NSObject! = self.flex.activeEditorValue + if activeEditorValue == nil { + activeEditorValue = "" } - - let title = NSLocalizedString("Edit Confirmation", comment: "") - let message = NSLocalizedString("Do you want to commit the edit?", comment: "") - let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert) - alert.addAction(UIAlertAction(title: NSLocalizedString("Ok", comment: ""), style: .Default, handler: nil)) - alert.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .Cancel, handler: {(action) -> Void in - self._flex.cells.setCellData(self._temp, forRow: range.row, inColumn: range.col) - self._flex.invalidate() - })) - self.presentViewController(alert, animated: true, completion: nil) - } - - return false; - } - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + if self.flex.cells.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false).isEqual(activeEditorValue) { + eventContainerEventArgs.cancel = true + return + } + let prev: NSObject = self.flex.cells.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false) + var title: String = String() + var message: String = String() + title = NSLocalizedString("Edit Confirmation", comment: "") + message = NSLocalizedString("Do you want to commit the edit?", comment: "") + let alertController: UIAlertController = UIAlertController(title: title, message: message, preferredStyle: .Alert) + let okAction: UIAlertAction = UIAlertAction(title: NSLocalizedString("Ok", comment: ""), style: .Default, handler: {(action: UIAlertAction) -> Void in + }) + let cancelAction: UIAlertAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .Cancel, handler: {(action: UIAlertAction) -> Void in + self.flex.cells.setCellData(prev, forRow: eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + }) + alertController.addAction(okAction) + alertController.addAction(cancelAction) + self.presentViewController(alertController, animated: true, completion: { _ in }) + eventContainerEventArgs.cancel = false + }, forObject: self) } - */ + @IBOutlet weak var flex: FlexGrid! } +// +// EditConfirmationController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/EditingFormController.swift b/Swift/FlexGrid101/FlexGrid101/EditingFormController.swift index ae9a47a..4e176ba 100644 --- a/Swift/FlexGrid101/FlexGrid101/EditingFormController.swift +++ b/Swift/FlexGrid101/FlexGrid101/EditingFormController.swift @@ -1,15 +1,18 @@ -import Foundation +// +// EditingFormController.h +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit -class EditingFormController: UIViewController, FlexGridDelegate { - +class EditingFormController: UIViewController { + var edited: CustomerData! - @IBOutlet weak var editpanel: UIVisualEffectView! - - var flex: FlexGrid! = nil; - func cancel() { + let objEdit: CustomerObjectEditor = (self.childViewControllers[0] as! CustomerObjectEditor) objEdit.resignFirstResponder() UIView.animateWithDuration(0.7, animations: {() -> Void in self.editpanel.alpha = 0 @@ -19,35 +22,40 @@ class EditingFormController: UIViewController, FlexGridDelegate { } func confirm() { - flex.collectionView.raiseCollectionChanged() - cancel() + self.flex.collectionView.raiseCollectionChanged() + self.cancel() } override func viewDidLoad() { super.viewDidLoad() - efc = self - flex = FlexGrid() - flex.columnHeaderFont = UIFont.boldSystemFontOfSize(flex.columnHeaderFont.pointSize) - flex.isReadOnly = true - flex.delegate = self - flex.itemsSource = CustomerData.getCustomerData(100) - flex.tag = 1 - flex.autoSizeColumns(0, to: Int32(flex.columns.count) - 1) - view.addSubview(flex) - view.sendSubviewToBack(flex) + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.itemsSource = NSMutableArray(array: CustomerData.getCustomerData(100)) + self.flex.flexGridSelectionChanged.addHandler({(eventContainer: XuniEventContainer!) -> Void in + self.editaction.enabled = true + }, forObject: self) + self.flex.flexGridTapped.addHandler({(eventContainer: XuniEventContainer!) -> Void in + self.cancel() + }, forObject: self) + self.flex.flexGridCellDoubleTapped.addHandler({(eventContainer: XuniEventContainer!) -> Void in + if !self.editpanel.hidden { + self.cancel() + return + } + dispatch_async(dispatch_get_main_queue(), {() -> Void in + self.beginEditing() + }) + }, forObject: self) + self.flex.autoSizeColumns(0, to: Int32(self.flex.columns.count - 1)) } - func tapped(sender: FlexGrid!, point: XuniPoint!) -> Bool { - cancel() - return false + @IBAction func doedit(sender: AnyObject) { + self.beginEditing() } - - func cellDoubleTapped(sender: FlexGrid!, panel: FlexGridPanel!, forRange range: FlexCellRange!) -> Bool { - if !editpanel.hidden { - tapped(nil, point: nil) - return false - } - edited = flex.itemsSource.objectAtIndex(Int(range.row)) as! CustomerData + + func beginEditing() { + self.edited = self.flex.collectionView.items![Int(self.flex.selection.row)] as! CustomerData + let objEdit: CustomerObjectEditor = (self.childViewControllers[0] as! CustomerObjectEditor) objEdit.initObject() self.editpanel.alpha = 0 self.editpanel.hidden = false @@ -56,22 +64,15 @@ class EditingFormController: UIViewController, FlexGridDelegate { }, completion: {(finished: Bool) -> Void in self.editpanel.alpha = 1 }) - return false - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - if (self.navigationController == nil) {return;} - let ss: CGFloat = UIApplication.sharedApplication().statusBarFrame.size.height + navigationController!.navigationBar.intrinsicContentSize().height - flex.frame = CGRectMake(0, ss, view.bounds.size.width, view.bounds.size.height - ss) - flex.setNeedsDisplay() - } + @IBOutlet weak var editpanel: UIVisualEffectView! + @IBOutlet weak var flex: FlexGrid! + @IBOutlet weak var editaction: UIBarButtonItem! } - -var efc: EditingFormController! = nil - -var edited: CustomerData! = nil +// +// GettingStartedController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/FilterController.swift b/Swift/FlexGrid101/FlexGrid101/FilterController.swift index 8fd45aa..ac6212f 100644 --- a/Swift/FlexGrid101/FlexGrid101/FilterController.swift +++ b/Swift/FlexGrid101/FlexGrid101/FilterController.swift @@ -1,259 +1,126 @@ // -// FilterController.swift +// FilterController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit -import Foundation +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit class FilterController: UIViewController { - - var _flex = FlexGrid() - var _filterButton = UIButton() - var _removeButton = UIButton() - let sharedData = SharedFilterData.sharedInstance - - override func viewDidLoad() { - super.viewDidLoad() + @IBOutlet weak var flex: FlexGrid! - // Do any additional setup after loading the view. - _filterButton = UIButton(type: UIButtonType.System) - _filterButton.setTitle(NSLocalizedString("Filter", comment: ""), forState: UIControlState.Normal) - _filterButton.addTarget(self, action: "filterButtonClicked", forControlEvents: UIControlEvents.TouchUpInside) - - _removeButton = UIButton(type: UIButtonType.System) - _removeButton.setTitle(NSLocalizedString("Remove", comment: ""), forState: UIControlState.Normal) - _removeButton.addTarget(self, action: "removeButtonClicked", forControlEvents: UIControlEvents.TouchUpInside) - - _flex.isReadOnly = true - _flex.itemsSource = CustomerData.getCustomerData(100) - - self.view.addSubview(_flex) - self.view.addSubview(_removeButton) - self.view.addSubview(_filterButton) - + func doDropFilter() { + self.filterButton.title = NSLocalizedString("Filter", comment:"") + self.removeFilterButton.enabled = false + self.filterPane.hidden = true + self.flex.collectionView.filter = {(item: NSObject!) -> Bool in + return true + } } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - _filterButton.frame = CGRectMake(0, 60, self.view.bounds.size.width/2, 50) - _removeButton.frame = CGRectMake(self.view.bounds.size.width/2, 60, self.view.bounds.size.width/2, 50) - _flex.frame = CGRectMake(0, 110, self.view.bounds.size.width, self.view.bounds.size.height-110) - _flex.setNeedsDisplay() - } - - override func viewDidAppear(animated: Bool) { - super.viewDidAppear(true) - let filterSet = SharedFilterData.sharedInstance.filterSet - - if (filterSet != nil && filterSet == true) { - - if (self.sharedData.filterOperation == 0) { - self.containsFilter() - } - else if (self.sharedData.filterOperation == 1){ - self.beginsWithFilter() - } - else if (self.sharedData.filterOperation == 2){ - self.endsWithFilter() - } - else if (self.sharedData.filterOperation == 3){ - self.equalsFilter() - } + func doApplyFilter() { + self.filterButton.title = NSLocalizedString("Change", comment:"") + self.filterPane.hidden = true + self.removeFilterButton.enabled = true + self.flex.collectionView.filter = {(item: NSObject!) -> Bool in + let shared = FilterData.sharedFilterData() + var result: Bool = true + for i in 0 ..< shared.count { + + let fd: FilterData = shared[i] as! FilterData + + let col: GridColumn = (self.flex.columns![Int32(i)] as! GridColumn) + let thisprop: String = col.getBoundValue(item).description.lowercaseString + if fd.filterString == nil + { + continue + } + let filterstr: String = fd.filterString.lowercaseString + print(filterstr) + if filterstr.characters.count > 0 { + if fd.filterOperation == 0 { + //contains + if !thisprop.containsString(filterstr) { + result = false + } + } + else if fd.filterOperation == 1 { + //starts + if !thisprop.hasPrefix(filterstr) { + result = false + } + } + else if fd.filterOperation == 2 { + //ends + if !thisprop.hasSuffix(filterstr) { + result = false + } + } + else if fd.filterOperation == 3 { + //equalstext + if !(thisprop == filterstr) { + result = false + } + } + } + } + return result } } - - override func viewDidDisappear(animated: Bool) { - super.viewDidDisappear(true) - self.sharedData.filterSet = false - self.sharedData.filterString = "" - self.sharedData.filterOperation = 0 - } - - func filterButtonClicked(){ - self.performSegueWithIdentifier("FilterFormSegue", sender: self) - } - func containsFilter(){ - let dateFormat = NSDateFormatter() - dateFormat.setLocalizedDateFormatFromTemplate("M/d/yy") - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - let d = item as! CustomerData - - if (String(format: "%.f", d.customerID).rangeOfString(self.sharedData.filterString) != nil) { - return true - } - else if (String(format: "%.f", d.countryID).rangeOfString(self.sharedData.filterString) != nil) { - return true - } - else if (String(format: "%.f", d.orderTotal).rangeOfString(self.sharedData.filterString.lowercaseString) != nil) { - return true - } - else if (d.firstName.lowercaseString.rangeOfString(self.sharedData.filterString.lowercaseString) != nil) { - return true - } - else if (d.lastName.lowercaseString.rangeOfString(self.sharedData.filterString.lowercaseString) != nil) - { - return true - } - else if (d.city.lowercaseString.rangeOfString(self.sharedData.filterString.lowercaseString) != nil){ - return true - } - else if (d.address.lowercaseString.rangeOfString(self.sharedData.filterString.lowercaseString) != nil){ - return true - } - else if (d.country.lowercaseString.rangeOfString(self.sharedData.filterString.lowercaseString) != nil){ - return true - } - else if (dateFormat.stringFromDate(d.lastOrderDate).rangeOfString(self.sharedData.filterString.lowercaseString) != nil) { - return true - } - else { - return false - } - } as IXuniPredicate - } - - func equalsFilter(){ - let dateFormat = NSDateFormatter() - dateFormat.setLocalizedDateFormatFromTemplate("M/d/yy") - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - let d = item as! CustomerData - - if (String(format: "%.f", d.customerID) == self.sharedData.filterString) { - return true - } - else if (String(format: "%.f", d.countryID) == self.sharedData.filterString) { - return true - } - else if (String(format: "%.f", d.orderTotal) == self.sharedData.filterString) { - return true - } - else if (d.firstName == self.sharedData.filterString) { - return true - } - else if (d.lastName == self.sharedData.filterString) - { - return true - } - else if (d.city == self.sharedData.filterString){ - return true - } - else if (d.address == self.sharedData.filterString){ - return true - } - else if (d.country == self.sharedData.filterString){ - return true - } - else if (dateFormat.stringFromDate(d.lastOrderDate) == self.sharedData.filterString) { - return true - } - else { - return false - } - } as IXuniPredicate - } - func endsWithFilter(){ - let dateFormat = NSDateFormatter() - dateFormat.setLocalizedDateFormatFromTemplate("M/d/yy") - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - let d = item as! CustomerData - - if (String(format: "%.f", d.customerID).hasSuffix(self.sharedData.filterString)) { - return true - } - else if (String(format: "%.f", d.countryID).hasSuffix(self.sharedData.filterString)) { - return true - } - else if (String(format: "%.f", d.orderTotal).hasSuffix(self.sharedData.filterString)) { - return true - } - else if (d.firstName.lowercaseString.hasSuffix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (d.lastName.lowercaseString.hasSuffix(self.sharedData.filterString.lowercaseString)){ - return true - } - else if (d.city.lowercaseString.hasSuffix(self.sharedData.filterString.lowercaseString)){ - return true - } - else if (d.address.hasSuffix(self.sharedData.filterString.lowercaseString)){ - return true - } - else if (d.country.lowercaseString.hasSuffix(self.sharedData.filterString.lowercaseString)){ - return true - } - else if (dateFormat.stringFromDate(d.lastOrderDate).hasSuffix(self.sharedData.filterString.lowercaseString)) { - return true - } - else { - return false - } - } as IXuniPredicate - } - func beginsWithFilter(){ - let dateFormat = NSDateFormatter() - dateFormat.setLocalizedDateFormatFromTemplate("M/d/yy") - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - let d = item as! CustomerData - - if (String(format: "%.f", d.customerID).hasPrefix(self.sharedData.filterString)) { - return true - } - else if (String(format: "%.f", d.countryID).hasPrefix(self.sharedData.filterString)) { - return true - } - else if (String(format: "%.f", d.orderTotal).hasPrefix(self.sharedData.filterString)) { - return true - } - else if (d.firstName.lowercaseString.hasPrefix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (d.lastName.lowercaseString.hasPrefix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (d.city.lowercaseString.hasPrefix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (d.address.lowercaseString.hasPrefix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (d.country.lowercaseString.hasPrefix(self.sharedData.filterString.lowercaseString)) { - return true - } - else if (dateFormat.stringFromDate(d.lastOrderDate).hasPrefix(self.sharedData.filterString)) { - return true - } - else { - return false + + func doStartEditingFilter() { + if (self.filterButton.title == NSLocalizedString("Filter", comment:"")) { + let shared = FilterData.sharedFilterData() + shared.removeAllObjects() + for i:UInt in 0 ..< self.flex.columns.count { + let c: GridColumn = self.flex.columns![Int32(i)] as! GridColumn + let fd: FilterData = FilterData() + fd.filterColumn = c.header + fd.filterOperation = 0 + fd.filterString = nil + shared.addObject(fd) } - return false - } as IXuniPredicate + } + let filterController: FilterGridViewController = (self.childViewControllers.first as! FilterGridViewController) + filterController.flex.itemsSource = FilterData.sharedFilterData() + let operID: GridColumn = (filterController.flex.columns[1] as! GridColumn) + let items = FilterOperation.defaultOperations() + operID.dataMap = GridDataMap(array: items, selectedValuePath: "identifier", displayMemberPath: "title") + self.filterButton.title = NSLocalizedString("Done", comment: "") + self.filterPane.hidden = false + self.removeFilterButton.enabled = true } - func removeButtonClicked(){ - self.sharedData.filterSet = false - self.sharedData.filterString = "" - self.sharedData.filterOperation = 0 - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - return true + + @IBAction func doFilter(sender: AnyObject) { + if (self.filterButton.title == NSLocalizedString("Done", comment: "")) { + self.doApplyFilter() } + else { + self.doStartEditingFilter() + } + } + + @IBAction func removeFilter(sender: AnyObject) { + self.doDropFilter() } - /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + override func viewDidLoad() { + super.viewDidLoad() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) } - */ + @IBOutlet weak var filterButton: UIBarButtonItem! + @IBOutlet weak var removeFilterButton: UIBarButtonItem! + @IBOutlet weak var filterPane: UIVisualEffectView! } +// +// FilterController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/FilterData.swift b/Swift/FlexGrid101/FlexGrid101/FilterData.swift new file mode 100644 index 0000000..16e636e --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/FilterData.swift @@ -0,0 +1,67 @@ +// +// SharedFilterData.h +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// +import Foundation + + +class FilterOperation: NSObject { + var title: String + var identifier: Int + + override init() + { + title="" + identifier = 0 + super.init() + } + + class func defaultOperations() -> [FilterOperation] { + let operations: String = "Contains|StartsWith|EndsWith|EqualsText" + let operationsArray: [String] = operations.componentsSeparatedByString("|") + var result: [FilterOperation] = [FilterOperation]() + for operation: String in operationsArray { + let oper: FilterOperation = FilterOperation() + oper.title = operation + oper.identifier = operationsArray.indexOf(operation)! + result.append(oper) + } + return result + } +} + +class FilterData: NSObject { + var filterColumn: String + var filterOperation: Int + var filterString: String! + + override init() + { + filterColumn = "" + filterOperation = 0 + filterString = "" + super.init() + } + + static var sharedInstance: NSMutableArray! = nil + + class func sharedFilterData() -> NSMutableArray! { + + let lockQueue = dispatch_queue_create("com.test.LockQueue", nil) + + dispatch_sync(lockQueue) { + if (sharedInstance == nil) { + sharedInstance = NSMutableArray() + } + } + return sharedInstance! + } +} +// +// SharedFilterData.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/FilterGridViewController.swift b/Swift/FlexGrid101/FlexGrid101/FilterGridViewController.swift new file mode 100644 index 0000000..1900697 --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/FilterGridViewController.swift @@ -0,0 +1,23 @@ +// +// FilterGridViewController.h +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// +import UIKit +import XuniFlexGridDynamicKit + +class FilterGridViewController: UIViewController { + @IBOutlet weak var flex: FlexGrid! + + override func viewDidLoad() { + super.viewDidLoad() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + } +} +// +// FilterGridViewController.m +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/FrozenCellsController.swift b/Swift/FlexGrid101/FlexGrid101/FrozenCellsController.swift index b4feb07..e2b147b 100644 --- a/Swift/FlexGrid101/FlexGrid101/FrozenCellsController.swift +++ b/Swift/FlexGrid101/FlexGrid101/FrozenCellsController.swift @@ -1,64 +1,37 @@ // -// FrozenCellsController.swift +// FrozenCellsController.h // FlexGrid101 // -// Created by Mykola Kotyuck on 21.10.15. // Copyright © 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit class FrozenCellsController: UIViewController { - var _flex = FlexGrid() - + override func viewDidLoad() { super.viewDidLoad() - - // Do any additional setup after loading the view. - _flex.isReadOnly = true - _flex.columnHeaderFont = UIFont.boldSystemFontOfSize(_flex.columnHeaderFont.pointSize) - _flex.itemsSource = CustomerData.getCustomerData(100) - _flex.autoSizeColumns(0, to: Int32(Int(_flex.columns.count)-1)) - _flex.frozenRows = 1 - _flex.frozenColumns = 1 - - _flex.allowMerging = FlexGridAllowMerging.Cells; - - for(var i = 0; i Bool { - return true - } - func textFieldDidBeginEditing(textField: UITextField) { - textField.selectAll(nil) - } - func textFieldShouldEndEditing(textField: UITextField) -> Bool { - return true - } - func textFieldDidEndEditing(textField: UITextField) { - let dateFormat = NSDateFormatter() - dateFormat.setLocalizedDateFormatFromTemplate("M/d/yy") - _flex.collectionView.filter = {(item : NSObject?) -> Bool in - let d = item as! CustomerData; + self.filterField.keyboardType = .Default + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) - if (String(format: "%.f", d.customerID) == textField.text) { - return true - } - else if (String(format: "%.f", d.countryID) == textField.text) { - return true - } - else if (String(format: "%.f", d.orderTotal) == textField.text) { - return true - } - else if (d.firstName == textField.text) { - return true - } - else if (d.lastName == textField.text) - { - return true + self.flex.flexGridFormatItem.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridFormatItemEventArgs + if eventContainerEventArgs.panel == self.flex.cells { + if !(self.flex.editRange==nil) && self.flex.editRange.intersects(eventContainerEventArgs.cellRange) { + return + } + + if (self.flex.columns![eventContainerEventArgs.col] as! GridColumn).dataType == XuniDataType.Boolean + { + return + } + + do + { + + let regex: NSRegularExpression = try NSRegularExpression(pattern: self.filterField.text!, options: NSRegularExpressionOptions.CaseInsensitive) + let data: String = self.flex.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: true).description + + let attributedString: NSMutableAttributedString = NSMutableAttributedString(string:data) + let allMatches = regex.matchesInString(data, options: NSMatchingOptions(), range: NSMakeRange(0, data.characters.count)) + for aMatch: NSTextCheckingResult in allMatches { + let matchRange: NSRange = aMatch.range + attributedString.setAttributes([NSFontAttributeName: UIFont.boldSystemFontOfSize(self.flex.font.pointSize), NSForegroundColorAttributeName: UIColor.redColor()], range: matchRange) + } + + var t: CGRect = eventContainerEventArgs.panel.getCellRectForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + let col: GridColumn = self.flex.columns![eventContainerEventArgs.col] as! GridColumn + let sz: CGSize = attributedString.size() + let align: NSTextAlignment = col.horizontalAlignment + if align == .Right { + var mod = t.size.width - sz.width - 4 + if mod < 4 { + mod = 4 + } + t.origin.x += mod + } + else if align == .Center { + var mod = (t.size.width - sz.width) / 2 + if mod < 4 { + mod = 4 + } + t.origin.x += mod + } + else { + t.origin.x += 4 + } + + var mod = (t.size.height - sz.height) / 2 + if mod < 4 { + mod = 4 + } + t.origin.y += mod + attributedString.drawInRect(t) + eventContainerEventArgs.cancel = true + } + catch + { + + } + } - else if (d.city == textField.text){ - return true - } - else if (d.address == textField.text){ - return true - } - else if (d.country == textField.text){ - return true - } - else if (dateFormat.stringFromDate(d.lastOrderDate) == textField.text) { - return true - } - else { - return false - } - } as IXuniPredicate; + }, forObject: self) } - - func textFieldShouldReturn(textField: UITextField) -> Bool { - textField.resignFirstResponder() - return true + + @IBAction func onTextChange(sender: UITextField) { + let textField: UITextField = sender + let flex: FlexGrid = self.flex + let dateFormat: NSDateFormatter = NSDateFormatter() + dateFormat.dateFormat = "M/d/yy" + if textField.text?.characters.count > 0 { + flex.collectionView.filter = {(item: NSObject!) -> Bool in + let d: CustomerData = (item as! CustomerData) + if "\(d.customerID)".lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if "\(d.countryID)".lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if "\(d.email)".lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if d.firstName.lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if d.lastName.lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if d.country.lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if d.city.lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if d.address.lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else if dateFormat.stringFromDate(d.lastOrderDate).lowercaseString.containsString(textField.text!.lowercaseString) { + return true + } + else { + return false + } + + } + } + else { + flex.collectionView.filter = nil + } } - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + + @IBAction func finishedit(sender: UITextField) { + sender.resignFirstResponder() } - */ - + + @IBOutlet weak var filterField: UITextField! + @IBOutlet weak var flex: FlexGrid! } +// +// FullTextFilterController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/GettingStartedController.swift b/Swift/FlexGrid101/FlexGrid101/GettingStartedController.swift index 85b001a..9e28f05 100644 --- a/Swift/FlexGrid101/FlexGrid101/GettingStartedController.swift +++ b/Swift/FlexGrid101/FlexGrid101/GettingStartedController.swift @@ -1,49 +1,94 @@ // -// GettingStartedController.swift +// EditingController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit + +class GettingStartedController: UIViewController, FlexGridDelegate { -class GettingStartedController: UIViewController { - var _flex = FlexGrid() - override func viewDidLoad() { super.viewDidLoad() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = false + self.flex.delegate = self + self.flex.flexGridAutoGeneratingColumn.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridAutoGeneratingColumnEventArgs + if (eventContainerEventArgs.propertyInfo.name == "country") || (eventContainerEventArgs.propertyInfo.name == "name") || (eventContainerEventArgs.propertyInfo.name == "orderAverage") { + eventContainerEventArgs.cancel = true + } + else if (eventContainerEventArgs.propertyInfo.name == "customerID") { + eventContainerEventArgs.column.isReadOnly = true + } + else if (eventContainerEventArgs.propertyInfo.name == "countryID") { + eventContainerEventArgs.column.header = "Country" + eventContainerEventArgs.column.horizontalAlignment = .Left + let items = CustomerData.defaultCountries() + eventContainerEventArgs.column.dataMap = GridDataMap(array: items, selectedValuePath: "identifier", displayMemberPath: "title") + } + else if (eventContainerEventArgs.propertyInfo.name == "orderTotal") { + eventContainerEventArgs.column.format = "C2" + } + else if (eventContainerEventArgs.propertyInfo.name == "address") { + eventContainerEventArgs.column.wordWrap = true + } - // Do any additional setup after loading the view. - _flex.isReadOnly = true - _flex.itemsSource = CustomerData.getCustomerData(100) - _flex.autoSizeColumns(0, to: Int32(Int(_flex.columns.count)-1)) - - self.view.addSubview(_flex) + }, forObject: self) + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - if (self.navigationController == nil) {return;} - - let ss = UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.intrinsicContentSize().height; - - _flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss) - _flex.setNeedsDisplay() + + func prepareCellForEdit(sender: FlexGrid, panel: GridPanel, forRange range: GridCellRange) -> Bool { + let flex: FlexGrid = self.flex + let col: GridColumn = flex.columns![range.col] as! GridColumn + if (col.binding == "lastOrderDate") { + let editor: UITextField = (flex.activeEditor as! UITextField) + let picker: UIDatePicker = UIDatePicker() + let d: NSDate = (flex.cells.getCellDataForRow(range.row, inColumn: range.col, formatted: false) as! NSDate) + picker.opaque = true + picker.datePickerMode = .Date + picker.date = d + picker.addTarget(self, action: #selector(onDatePickerChanged(_:)), forControlEvents: .ValueChanged) + editor.inputView = picker + let toolbar: UIToolbar = UIToolbar(frame: CGRectMake(0, 0, flex.frame.size.width, 44)) + toolbar.barStyle = .Default + let done: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: #selector(endEditDatePicker(_:))) + let space: UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .FlexibleSpace, target: nil, action: nil) + toolbar.items = [space, done] + editor.inputAccessoryView = toolbar + editor.clearButtonMode = .Never + } + return false + } + + func onDatePickerChanged(sender: UIDatePicker) { + let flex: FlexGrid = self.flex + let editor: UITextField = (flex.activeEditor as! UITextField) + let c: GridColumn = flex.columns![flex.editRange.col] as! GridColumn + editor.text = String(c.getFormattedValue(sender.date)) } - /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + func endEditDatePicker(textField: UITextField) -> Bool { + let flex: FlexGrid = self.flex + let editor: UITextField = (flex.activeEditor as! UITextField) + let picker: UIDatePicker = (editor.inputView as! UIDatePicker) + flex.cells.setCellData(picker.date, forRow: flex.editRange.row, inColumn: flex.editRange.col) + flex.finishEditing(true) + return true } - */ + @IBOutlet weak var flex: FlexGrid! } +// +// EditingController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/GroupingController.swift b/Swift/FlexGrid101/FlexGrid101/GroupingController.swift index b282518..28212eb 100644 --- a/Swift/FlexGrid101/FlexGrid101/GroupingController.swift +++ b/Swift/FlexGrid101/FlexGrid101/GroupingController.swift @@ -1,67 +1,46 @@ // -// GroupingController.swift +// GroupingController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit class GroupingController: UIViewController { - var _flex = FlexGrid() - var _sortAscendingButton = UIButton() - var _sortDescendingButton = UIButton() + override func viewDidLoad() { super.viewDidLoad() - - _flex.autoGenerateColumns = false - let c1: FlexColumn = FlexColumn() - c1.binding = "firstName" - c1.header = NSLocalizedString("First Name", comment: "") + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.autoGenerateColumns = false + let c1: GridColumn = GridColumn() + c1.binding = "active" + c1.header = NSLocalizedString("Active", comment: "") c1.width = 100 - let c2: FlexColumn = FlexColumn() - c2.binding = "lastName" - c2.header = NSLocalizedString("Last Name", comment: "") - let c3: FlexColumn = FlexColumn() + let c2: GridColumn = GridColumn() + c2.binding = "firstName" + c2.header = NSLocalizedString("Name", comment: "") + let c3: GridColumn = GridColumn() c3.binding = "orderTotal" c3.header = NSLocalizedString("Order Total", comment: "") c3.format = "C" c3.aggregate = XuniAggregate.Sum - _flex.columns.addObject(c1) - _flex.columns.addObject(c2) - _flex.columns.addObject(c3) - - - // Do any additional setup after loading the view. - _sortAscendingButton = UIButton(type: UIButtonType.System) - _sortAscendingButton.setTitle(NSLocalizedString("Ascending", comment: ""), forState: UIControlState.Normal) - _sortAscendingButton.addTarget(self, action: "sortAscendingButtonClicked", forControlEvents: UIControlEvents.TouchUpInside) - - _sortDescendingButton = UIButton(type: UIButtonType.System) - _sortDescendingButton.setTitle(NSLocalizedString("Descending", comment: ""), forState: UIControlState.Normal) - _sortDescendingButton.addTarget(self, action: "sortDescendingButtonClicked", forControlEvents: UIControlEvents.TouchUpInside) - - _flex.itemsSource = CustomerData.getCustomerData(100) - _flex.isReadOnly = true - - let gd = XuniPropertyGroupDescription(property: "country") - let sd = XuniSortDescription(property: "country", ascending: true) - - _flex.collectionView.groupDescriptions.addObject(gd) - _flex.collectionView.sortDescriptions.addObject(sd) - - self.starSizing(_flex) - self.view.addSubview(_flex) - self.view.addSubview(_sortDescendingButton) - self.view.addSubview(_sortAscendingButton) + self.flex.columns.addObject(c1) + self.flex.columns.addObject(c2) + self.flex.columns.addObject(c3) + let gd: XuniPropertyGroupDescription = XuniPropertyGroupDescription(property: "country") + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) + self.flex.collectionView.groupDescriptions.addObject(gd) + self.starSizing(self.flex) } - + func starSizing(g: FlexGrid) { - for var i:UInt = 0; i < g.columns.count; i++ { - let c: FlexColumn = g.columns.objectAtIndex(i) as! FlexColumn - c.widthType = FlexColumnWidth.Star - c.width = (i == 0) ? 3 : (i == 3) ? 3 : 4 + for i:UInt in 0 ..< g.columns.count { + let c: GridColumn = g.columns.objectAtIndex(i) as! GridColumn + c.widthType = GridColumnWidth.Star + c.width = (i == 0) ? 2 : (i == 3) ? 3 : 4 } } @@ -69,37 +48,60 @@ class GroupingController: UIViewController { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - _sortAscendingButton.frame = CGRectMake(0, 60, self.view.bounds.size.width/2, 50) - _sortDescendingButton.frame = CGRectMake(self.view.bounds.size.width/2, 60, self.view.bounds.size.width/2, 50) - _flex.frame = CGRectMake(0, 110, self.view.bounds.size.width, self.view.bounds.size.height-110) - - _flex.setNeedsDisplay() + + @IBAction func doSort(sender: AnyObject) { + let btn: UIBarButtonItem = (sender as! UIBarButtonItem) + if (btn.title == NSLocalizedString("Z-A", comment:"")) { + self.sortDescendingButtonClicked() + btn.title = NSLocalizedString("A-Z", comment:"") + } + else { + self.sortAscendingButtonClicked() + btn.title = NSLocalizedString("Z-A", comment:"") + } } - - func sortAscendingButtonClicked(){ - _flex.collectionView.sortDescriptions.removeAllObjects() - let sd = XuniSortDescription(property: "country", ascending: true) - _flex.collectionView.sortDescriptions.addObject(sd) + + @IBAction func doCollapse(sender: AnyObject) { + let btn: UIBarButtonItem = (sender as! UIBarButtonItem) + if (btn.title == NSLocalizedString("Collapse", comment:"")) { + self.flex.collapseGroupsToLevel(0) + btn.title = NSLocalizedString("Expand", comment:"") + } + else { + if self.flex.finishEditing(false) { + for i:UInt in 0 ..< self.flex.rows.count { + let row: GridRow = (self.flex.rows.objectAtIndex(i) as! GridRow) + if (row is GridGroupRow) { + let group: GridGroupRow = (row as! GridGroupRow) + group.isCollapsed = false + } + } + } + btn.title = NSLocalizedString("Collapse", comment:"") + } } - - func sortDescendingButtonClicked(){ - _flex.collectionView.sortDescriptions.removeAllObjects() - let sd = XuniSortDescription(property: "country", ascending: false) - _flex.collectionView.sortDescriptions.addObject(sd) + + func sortAscendingButtonClicked() { + self.flex.collectionView.sortDescriptions.removeAllObjects() + let sd: XuniSortDescription = XuniSortDescription(property: "country", ascending: true) + self.flex.collectionView.sortDescriptions.addObject(sd) + self.collapseButton.title = NSLocalizedString("Collapse", comment:"") } - - /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + func sortDescendingButtonClicked() { + self.flex.collectionView.sortDescriptions.removeAllObjects() + let sd: XuniSortDescription = XuniSortDescription(property: "country", ascending: false) + self.flex.collectionView.sortDescriptions.addObject(sd) + self.collapseButton.title = NSLocalizedString("Collapse", comment:"") } - */ + @IBOutlet weak var flex: FlexGrid! + @IBOutlet weak var sortButton: UIBarButtonItem! + @IBOutlet weak var collapseButton: UIBarButtonItem! } +// +// GroupingController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/Images.xcassets/AppIcon.appiconset/Contents.json b/Swift/FlexGrid101/FlexGrid101/Images.xcassets/AppIcon.appiconset/Contents.json index c4071ec..eb31a95 100644 --- a/Swift/FlexGrid101/FlexGrid101/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Swift/FlexGrid101/FlexGrid101/Images.xcassets/AppIcon.appiconset/Contents.json @@ -34,14 +34,15 @@ "scale" : "3x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "ipad", - "filename" : "Icon-Small@2x-1-1.png", + "filename" : "Icon-Small@2x.png", "scale" : "2x" }, { diff --git a/Swift/FlexGrid101/FlexGrid101/License.swift b/Swift/FlexGrid101/FlexGrid101/License.swift index 232be7c..ecb877a 100644 --- a/Swift/FlexGrid101/FlexGrid101/License.swift +++ b/Swift/FlexGrid101/FlexGrid101/License.swift @@ -1,12 +1,16 @@ // -// License.swift +// License.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // +import Foundation -import UIKit +// +// License.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// -class License { - let key = "AB4BHgIeB4ZGAGwAZQB4AEcAcgBpAGQAMQAwADEAkf7VqlwSWAIrBuSL65BELUqK3YI1Cb3rbZFzoCwnGe1wt3JkXahSdQG7hGfuTcx/YqkghlGRBS4MiZ4Q4IGSpKKpM5YVaC3IAR5GB48NAhyHagUzdZdr2J/mrfU85xdF/Oca3ndHbigKLTbax5EhIplWEGjcgp/Shd6d/YXb9O5TYxkjCQZRhG+M2FixYW5O4PO7YsSN9xwpG16jcPyawoVgZcHo26kRtjBzeWBvtauJT8IfKEqzbreYPsJA5fHWL5/weR4cbLi7gb2aXm2GlMb2ROW/mu+dMRHj1JwBZej/emuIq0svBF6ziwIkbL2+hlsXmhUwg3RSawvwznlh3JSEJSqvlwYeBR9P3V6o0Yn6eOSM0yBwXFc3fILOzxEbJSkmV5GTDWaf9z/l19jnBeQgOckm5JLzzol4ryXEWA2UHjCLkpfYxwVtmjTXbnlO4RGc+tmeFQ6LuMx2Fd7SgT3lNLQ4nhK3fOGZXjwNClVut9B0XQFG7NlMfrpyM+TAcOTnjnHaotzmZdRamwy/5cyRAmVZI5JaPt5xoOSga9REoPkborcmtsY/lWam30Gq4jc5BQA5Cr99iwywVx5P6Tdp27vmzY+1phcAAETmOY9GB0FrUDWirSuqLutWr9zqYWIjg4YFLeQELGIE04lshXnxvWBJIjDlIGbEiel8Bw4wggVkMIIETKADAgECAhAiELIXSwsSf7soBS4RsyUKMA0GCSqGSIb3DQEBBQUAMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2lnbiBDbGFzcyAzIENvZGUgU2lnbmluZyAyMDEwIENBMB4XDTEzMDkyNDAwMDAwMFoXDTE2MTAyMzIzNTk1OVowgacxCzAJBgNVBAYTAlVTMRUwEwYDVQQIEwxQZW5uc3lsdmFuaWExEzARBgNVBAcTClBpdHRzYnVyZ2gxFTATBgNVBAoUDENvbXBvbmVudE9uZTE+MDwGA1UECxM1RGlnaXRhbCBJRCBDbGFzcyAzIC0gTWljcm9zb2Z0IFNvZnR3YXJlIFZhbGlkYXRpb24gdjIxFTATBgNVBAMUDENvbXBvbmVudE9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALnLoJqpSVVqnJLza05lTIcakcvyl7dxBxZ+cwk4Cqk6+UaC6f5Z5LvRD1+AhiARulIgI7vPgkCf+c83iOViQWyJuXFJMnGava3AZ6X/o0DaUqzYzFOWz/MrAzOJvYMtrj/NT9m8BWei+UkY1NWUytiSa0JINYt55i/FztxXtP7K27Lj3ZYwwUkNLOKJ4f+qkR0QSnygYUQQyMDOLg5vfYkDLdUQkNretBT2JZ6x6dkNcCpif5dbZ01MOFEEjZJlGdnvrenuOYfw5CNloDSCRzttSJ89JtJOjQxyrBQf1ylOXoiXCPpzAXCU2SF/dYXSimVM8pT0NZ7pUNG1H+Az2nMCAwEAAaOCAXswggF3MAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgeAMEAGA1UdHwQ5MDcwNaAzoDGGL2h0dHA6Ly9jc2MzLTIwMTAtY3JsLnZlcmlzaWduLmNvbS9DU0MzLTIwMTAuY3JsMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwMwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYTATBgNVHSUEDDAKBggrBgEFBQcDAzBxBggrBgEFBQcBAQRlMGMwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA7BggrBgEFBQcwAoYvaHR0cDovL2NzYzMtMjAxMC1haWEudmVyaXNpZ24uY29tL0NTQzMtMjAxMC5jZXIwHwYDVR0jBBgwFoAUz5mp6nsm9EvJjo/X8AUm7+PSp50wEQYJYIZIAYb4QgEBBAQDAgQQMBYGCisGAQQBgjcCARsECDAGAQEAAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBhzVY5zjwYAFjmIa2JSWbqeXQ1jrf2o5DoRYWgI/+4LEpJ+U2o+VAI5kIYSNGp5Yjq7XvQosjs/C6qdwpfTd3bh2lEER4XCRzpo+4HK9Wxwj0D8P1UoUn43LjlbMB/GzRRhNq0BN+ETlD0+BejspoUssd5GRhGLNOXmtDV+9/a7j7h9t5JEMk++JblysVe6UpcgtoY9XguZLsm5DOhQT0QIlgOIK1QSl/whiKGdPBfD5jN4/SHsGVUbPpC+Pxjh5yT/LSm9+Nqk+tzMQQcpbTfeLKs9kLgsG4Uo9fsg5wOl4FN4CBHo2CLXEqtriy3//rpUMOutVKmm1awHhgGqsuFMIICuDCCAaCgAwIBAgIIA4BNRfNjh0UwDQYJKoZIhvcNAQEFBQAwHDEaMBgGA1UEAwwRR0MtWFUxMTUwMC0xNDAwMjIwHhcNMTUwMTAxMDAwMDAwWhcNMTYwNDMwMDAwMDAwWjAcMRowGAYDVQQDDBFHQy1YVTExNTAwLTE0MDAyMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALIC2fLrGcFcpDQW2q/Ji12ubkVQq25/fjpqx8HH0pGt88xcKtXHFRnVRzEiZTdHiFgwnNyKN0I/auYS3BtXXMERvV/n4/58ziAnvPbXmw7Deh4CrVChTzFRi1OcAONSIo4mv4H/CHTYFwAvjX39XOWZI6LjU1pY5R1lYf2dwqmouItKAhalSzR0+X29b7u43W1wNqUv8k9xgen891RRixsbxKutVcWSeHxg1Uu6RdfWXRxtmMiteV+i7RReiux2FqVDz01xUZwQFhKX07q5BietRKA2OOmDxOBNkRE0Xe+jR4GyBLdTMlTL/P5XPh+CUzeA1ema6uyQzeY4BcVBNNsCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAbhZ3f5orEmJaHXGKEL+9r5wzjRcr+DHkEm4Q6O7lSgLtqV7qA3a1YfOeb7ySdpzLntgPJUusgTDljGUWJiU6mioGSjnadJHOsb73MSnFFU6vVqwfSJCpj5XaeJCozXX2mjM1536YM3NH88v3j5X7IrDv8XsTp6r38wc7ZJMf9SboQEVDLwI3WLsArTDJGxvcYZUUQooMkIdBSi7r/AgfC0CxmiUJpeH36LwG9EfIOJPH9+xN8NJXAL80+THKukzh7NoAX4lCm8t/g8IeKGWSWHJOegdYB0Nb04EYawOtwAEbyAO7JSFe+URrr0VwC6GvNqF8lFPAM8badjmHnlpVgQ==" -} +let key: String = "AB4BHgIeB4ZGAGwAZQB4AEcAcgBpAGQAMQAwADEAkf7VqlwSWAIrBuSL65BELUqK3YI1Cb3rbZFzoCwnGe1wt3JkXahSdQG7hGfuTcx/YqkghlGRBS4MiZ4Q4IGSpKKpM5YVaC3IAR5GB48NAhyHagUzdZdr2J/mrfU85xdF/Oca3ndHbigKLTbax5EhIplWEGjcgp/Shd6d/YXb9O5TYxkjCQZRhG+M2FixYW5O4PO7YsSN9xwpG16jcPyawoVgZcHo26kRtjBzeWBvtauJT8IfKEqzbreYPsJA5fHWL5/weR4cbLi7gb2aXm2GlMb2ROW/mu+dMRHj1JwBZej/emuIq0svBF6ziwIkbL2+hlsXmhUwg3RSawvwznlh3JSEJSqvlwYeBR9P3V6o0Yn6eOSM0yBwXFc3fILOzxEbJSkmV5GTDWaf9z/l19jnBeQgOckm5JLzzol4ryXEWA2UHjCLkpfYxwVtmjTXbnlO4RGc+tmeFQ6LuMx2Fd7SgT3lNLQ4nhK3fOGZXjwNClVut9B0XQFG7NlMfrpyM+TAcOTnjnHaotzmZdRamwy/5cyRAmVZI5JaPt5xoOSga9REoPkborcmtsY/lWam30Gq4jc5BQA5Cr99iwywVx5P6Tdp27vmzY+1phcAAETmOY9GB0FrUDWirSuqLutWr9zqYWIjg4YFLeQELGIE04lshXnxvWBJIjDlIGbEiel8Bw4wggVkMIIETKADAgECAhAiELIXSwsSf7soBS4RsyUKMA0GCSqGSIb3DQEBBQUAMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2lnbiBDbGFzcyAzIENvZGUgU2lnbmluZyAyMDEwIENBMB4XDTEzMDkyNDAwMDAwMFoXDTE2MTAyMzIzNTk1OVowgacxCzAJBgNVBAYTAlVTMRUwEwYDVQQIEwxQZW5uc3lsdmFuaWExEzARBgNVBAcTClBpdHRzYnVyZ2gxFTATBgNVBAoUDENvbXBvbmVudE9uZTE+MDwGA1UECxM1RGlnaXRhbCBJRCBDbGFzcyAzIC0gTWljcm9zb2Z0IFNvZnR3YXJlIFZhbGlkYXRpb24gdjIxFTATBgNVBAMUDENvbXBvbmVudE9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALnLoJqpSVVqnJLza05lTIcakcvyl7dxBxZ+cwk4Cqk6+UaC6f5Z5LvRD1+AhiARulIgI7vPgkCf+c83iOViQWyJuXFJMnGava3AZ6X/o0DaUqzYzFOWz/MrAzOJvYMtrj/NT9m8BWei+UkY1NWUytiSa0JINYt55i/FztxXtP7K27Lj3ZYwwUkNLOKJ4f+qkR0QSnygYUQQyMDOLg5vfYkDLdUQkNretBT2JZ6x6dkNcCpif5dbZ01MOFEEjZJlGdnvrenuOYfw5CNloDSCRzttSJ89JtJOjQxyrBQf1ylOXoiXCPpzAXCU2SF/dYXSimVM8pT0NZ7pUNG1H+Az2nMCAwEAAaOCAXswggF3MAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgeAMEAGA1UdHwQ5MDcwNaAzoDGGL2h0dHA6Ly9jc2MzLTIwMTAtY3JsLnZlcmlzaWduLmNvbS9DU0MzLTIwMTAuY3JsMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwMwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYTATBgNVHSUEDDAKBggrBgEFBQcDAzBxBggrBgEFBQcBAQRlMGMwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA7BggrBgEFBQcwAoYvaHR0cDovL2NzYzMtMjAxMC1haWEudmVyaXNpZ24uY29tL0NTQzMtMjAxMC5jZXIwHwYDVR0jBBgwFoAUz5mp6nsm9EvJjo/X8AUm7+PSp50wEQYJYIZIAYb4QgEBBAQDAgQQMBYGCisGAQQBgjcCARsECDAGAQEAAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBhzVY5zjwYAFjmIa2JSWbqeXQ1jrf2o5DoRYWgI/+4LEpJ+U2o+VAI5kIYSNGp5Yjq7XvQosjs/C6qdwpfTd3bh2lEER4XCRzpo+4HK9Wxwj0D8P1UoUn43LjlbMB/GzRRhNq0BN+ETlD0+BejspoUssd5GRhGLNOXmtDV+9/a7j7h9t5JEMk++JblysVe6UpcgtoY9XguZLsm5DOhQT0QIlgOIK1QSl/whiKGdPBfD5jN4/SHsGVUbPpC+Pxjh5yT/LSm9+Nqk+tzMQQcpbTfeLKs9kLgsG4Uo9fsg5wOl4FN4CBHo2CLXEqtriy3//rpUMOutVKmm1awHhgGqsuFMIICuDCCAaCgAwIBAgIIA4BNRfNjh0UwDQYJKoZIhvcNAQEFBQAwHDEaMBgGA1UEAwwRR0MtWFUxMTUwMC0xNDAwMjIwHhcNMTUwMTAxMDAwMDAwWhcNMTYwNDMwMDAwMDAwWjAcMRowGAYDVQQDDBFHQy1YVTExNTAwLTE0MDAyMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALIC2fLrGcFcpDQW2q/Ji12ubkVQq25/fjpqx8HH0pGt88xcKtXHFRnVRzEiZTdHiFgwnNyKN0I/auYS3BtXXMERvV/n4/58ziAnvPbXmw7Deh4CrVChTzFRi1OcAONSIo4mv4H/CHTYFwAvjX39XOWZI6LjU1pY5R1lYf2dwqmouItKAhalSzR0+X29b7u43W1wNqUv8k9xgen891RRixsbxKutVcWSeHxg1Uu6RdfWXRxtmMiteV+i7RReiux2FqVDz01xUZwQFhKX07q5BietRKA2OOmDxOBNkRE0Xe+jR4GyBLdTMlTL/P5XPh+CUzeA1ema6uyQzeY4BcVBNNsCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAbhZ3f5orEmJaHXGKEL+9r5wzjRcr+DHkEm4Q6O7lSgLtqV7qA3a1YfOeb7ySdpzLntgPJUusgTDljGUWJiU6mioGSjnadJHOsb73MSnFFU6vVqwfSJCpj5XaeJCozXX2mjM1536YM3NH88v3j5X7IrDv8XsTp6r38wc7ZJMf9SboQEVDLwI3WLsArTDJGxvcYZUUQooMkIdBSi7r/AgfC0CxmiUJpeH36LwG9EfIOJPH9+xN8NJXAL80+THKukzh7NoAX4lCm8t/g8IeKGWSWHJOegdYB0Nb04EYawOtwAEbyAO7JSFe+URrr0VwC6GvNqF8lFPAM8badjmHnlpVgQ==" \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/OnDemandController.swift b/Swift/FlexGrid101/FlexGrid101/OnDemandController.swift index 4f75606..8d67a3f 100644 --- a/Swift/FlexGrid101/FlexGrid101/OnDemandController.swift +++ b/Swift/FlexGrid101/FlexGrid101/OnDemandController.swift @@ -1,47 +1,100 @@ -import Foundation +// +// OnDemandController.h +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit class OnDemandController: UIViewController { - override func viewDidLoad() { - super.viewDidLoad() - let flex: FlexGrid = FlexGrid() - flex.columnHeaderFont = UIFont.boldSystemFontOfSize(flex.columnHeaderFont.pointSize) - flex.isReadOnly = true - flex.collectionView = DemoCursorCollectionView() - flex.tag = 1 - flex.autoSizeColumns(0, to: Int32(flex.columns.count) - 1) - view.addSubview(flex) + @IBAction func startSearching(sender: AnyObject) { + self.textInput.resignFirstResponder() + self.updateSearch() } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() + @IBAction func searchModeChanged(sender: AnyObject) { + self.updateSearch() } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - if (self.navigationController == nil) {return;} - let flex: FlexGrid = view.viewWithTag(1) as! FlexGrid - let ss: CGFloat = UIApplication.sharedApplication().statusBarFrame.size.height + navigationController!.navigationBar.intrinsicContentSize().height - flex.frame = CGRectMake(0, ss, view.bounds.size.width, view.bounds.size.height - ss) - flex.setNeedsDisplay() + func updateSearch() { + var selArray: [String] = ["relevance", "date", "viewCount", "rating", "title"] + let cv: YouTubeCollectionView = YouTubeCollectionView(query: self.textInput.text!, orderBy: selArray[self.sortSelect.selectedSegmentIndex]) + self.flex.collectionView = cv + cv.loadMoreItems(50, completion: {() -> Void in + }) } -} -class DemoCursorCollectionView: XuniCursorCollectionView { - - override init() { - super.init() - self.sourceCollection = CustomerData.getCustomerData(100) + override func viewDidLoad() { + super.viewDidLoad() + var dic: [NSObject : AnyObject] = [NSObject : AnyObject]() + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.isReadOnly = true + self.flex.autoGenerateColumns = false + let thumbnail: GridColumn = GridColumn() + thumbnail.binding = "thumbnail" + thumbnail.width = 150 + self.flex.columns.addObject(thumbnail) + let title: GridColumn = GridColumn() + title.binding = "title" + title.wordWrap = true + self.flex.columns.addObject(title) + let channel: GridColumn = GridColumn() + channel.binding = "channelTitle" + channel.wordWrap = true + self.flex.columns.addObject(channel) + + + self.flex.flexGridLoadedRows.addHandler({(eventContainer: XuniEventContainer!) -> Void in + for i:UInt in 0 ..< self.flex.rows.count { + let row: GridRow = self.flex.rows.objectAtIndex(i) as! GridRow + row.height = 75 + } + }, forObject: self) + self.flex.flexGridFormatItem.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridFormatItemEventArgs + let col: GridColumn = self.flex.columns.objectAtIndex(UInt(eventContainerEventArgs.col)) as! GridColumn + if (col.binding == "thumbnail") && eventContainerEventArgs.panel == self.flex.cells { + let url: String = String(self.flex.getCellDataForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col, formatted: false)) + let imgdata: NSData! = (dic[url] as! NSData!) + if imgdata == nil { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), {() -> Void in + let imgdata: NSData = NSData(contentsOfURL: NSURL(string: url)!)! + dispatch_async(dispatch_get_main_queue(), {() -> Void in + dic[url] = imgdata + self.flex.invalidate() + }) + }) + eventContainerEventArgs.cancel = true + return + } + let image: UIImage = UIImage(data:imgdata!)! + let r: CGRect = eventContainerEventArgs.panel.getCellRectForRow(eventContainerEventArgs.row, inColumn: eventContainerEventArgs.col) + let imageSize: CGSize = image.size + let viewSize: CGSize = r.size + let hfactor: Float = Float(imageSize.width) / Float(viewSize.width) + let vfactor: Float = Float(imageSize.height) / Float(viewSize.height) + let factor: Float = fmax(hfactor, vfactor) + let newWidth: Float = Float(imageSize.width) / factor + let newHeight: Float = Float(imageSize.height) / factor + let newRect: CGRect = CGRectMake(r.origin.x + (r.size.width - CGFloat(newWidth)) / 2, r.origin.y + (r.size.height - CGFloat(newHeight)) / 2, CGFloat(newWidth), CGFloat(newHeight)) + image.drawInRect(newRect) + eventContainerEventArgs.cancel = true + } + }, forObject: self) + self.updateSearch() } - - override func itemGetter(desiredNumber: NSNumber!) -> NSMutableArray! { - return CustomerData.getCustomerData(desiredNumber == nil ? 100 : Int(desiredNumber.intValue)) - } + @IBOutlet weak var flex: FlexGrid! + @IBOutlet weak var textInput: UITextField! + @IBOutlet weak var sortSelect: UISegmentedControl! +} +// +// OnDemandController.m +// FlexGrid101 +// +// Copyright © 2015 GrapeCity. All rights reserved. +// - override func hasMoreItems() -> Bool { - return sourceCollection.count < 400 - } -} \ No newline at end of file +import XuniCoreDynamicKit \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/RowDetailsViewController.swift b/Swift/FlexGrid101/FlexGrid101/RowDetailsViewController.swift index 1b67199..bf88489 100644 --- a/Swift/FlexGrid101/FlexGrid101/RowDetailsViewController.swift +++ b/Swift/FlexGrid101/FlexGrid101/RowDetailsViewController.swift @@ -1,45 +1,97 @@ // -// RowDetailsViewController.swift +// RowDetailsViewController.h // FlexGrid101 // // Copyright © 2016 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit class RowDetailsViewController: UIViewController { - @IBOutlet weak var grid: FlexGrid! - + @IBAction func detailModeChange(sender: AnyObject) { + switch self.detailMode.selectedSegmentIndex { + case 0: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityMode.ExpandSingle + case 1: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityMode.ExpandMultiple + case 2: + self.grid.detailProvider.detailVisibilityMode = GridDetailVisibilityMode.Selection + default: + self.grid.detailProvider.detailVisibilityMode = .None + } + + } + override func viewDidLoad() { super.viewDidLoad() self.grid.isReadOnly = true - self.grid.itemsSource = CustomerData.getCustomerData(100) - let rowHeaderLoadingEventHandler: IXuniEventHandler = {(sender: NSObject!, args: XuniEventArgs!) -> Void in - let e: FlexGridRowHeaderLoadingEventArgs = (args as! FlexGridRowHeaderLoadingEventArgs) + self.grid.selectionMode = GridSelectionMode.Row + self.grid.columnHeaderFont = UIFont.boldSystemFontOfSize(self.grid.columnHeaderFont.pointSize) + self.grid.autoGenerateColumns = false + + let identifier: GridColumn = GridColumn() + identifier.binding = "customerID" + identifier.header = "ID" + identifier.isReadOnly = true + identifier.widthType = GridColumnWidth.Pixel + identifier.width = 45 + self.grid.columns.addObject(identifier) + let firstName: GridColumn = GridColumn() + firstName.binding = "firstName" + firstName.widthType = GridColumnWidth.Star + firstName.width = 1 + self.grid.columns.addObject(firstName) + let lastName: GridColumn = GridColumn() + lastName.binding = "lastName" + lastName.widthType = GridColumnWidth.Star + lastName.width = 1 + self.grid.columns.addObject(lastName) + + self.grid.detailProvider.gridRowHeaderLoading.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridRowHeaderLoadingEventArgs let btn: UIButton = UIButton(type: .Custom) btn.setImage(UIImage(named: "show"), forState: (.Normal)) btn.setImage(UIImage(named: "hide"), forState: (.Selected)) btn.imageView!.contentMode = .ScaleAspectFit - e.button = btn - } - self.grid.detailProvider.gridRowHeaderLoading.addHandler(rowHeaderLoadingEventHandler, forObject: self) - let detailCellCreatingHandler: IXuniEventHandler = {(sender: NSObject!, args: XuniEventArgs!) -> Void in - let e: FlexGridDetailCellCreatingEventArgs = (args as! FlexGridDetailCellCreatingEventArgs) - let flex: FlexGrid = FlexGrid() - flex.itemsSource = NSMutableArray(array: XuniReflector.getProperties(e.row.dataItem)) - e.view = flex - } - self.grid.detailProvider.detailCellCreating.addHandler(detailCellCreatingHandler, forObject: self) - self.grid.detailProvider.detailVisibilityMode = FlexGridDetailVisibilityMode.ExpandMultiple - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. + eventContainerEventArgs.button = btn + }, forObject: self) + + self.grid.detailProvider.detailCellCreating.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let eventContainerEventArgs = eventContainer.eventArgs as! GridDetailCellCreatingEventArgs + let mapView: MKMapView = MKMapView() + eventContainerEventArgs.view = mapView + mapView.userInteractionEnabled = false + let geocoder: CLGeocoder = CLGeocoder() + geocoder.geocodeAddressString((eventContainerEventArgs.row.dataItem as! CustomerData).city, completionHandler: {(placemarks: [CLPlacemark]?, error: NSError?) -> Void in + if error != nil { + print("\(error)") + } + else { + let placemark: CLPlacemark = placemarks!.last! + let spanX: Double = 0.0725 + let spanY: Double = 0.0725 + var region: MKCoordinateRegion = MKCoordinateRegion() + region.center.latitude = placemark.location!.coordinate.latitude + region.center.longitude = placemark.location!.coordinate.longitude + region.span = MKCoordinateSpanMake(spanX, spanY) + mapView.setRegion(region, animated: false) + } + }) + }, forObject: self) + self.detailModeChange(self) + self.grid.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) } - - + @IBOutlet weak var grid: FlexGrid! + @IBOutlet weak var detailMode: UISegmentedControl! } +// +// RowDetailsViewController.m +// FlexGrid101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// + +import MapKit +import CoreLocation \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/SampleData.swift b/Swift/FlexGrid101/FlexGrid101/SampleData.swift new file mode 100644 index 0000000..b62a71a --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/SampleData.swift @@ -0,0 +1,22 @@ +// +// SampleData.h +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// +import Foundation +class SampleData: NSObject { + var title: String = "" + var subtitle: String = "" + var thumbnail: String = "" + var link: String = "" + var channelTitle: String = "" + + init(title: String, subtitle: String) { + self.title = title + self.subtitle = subtitle + + super.init() + + } +} \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/SelectionModesController.swift b/Swift/FlexGrid101/FlexGrid101/SelectionModesController.swift index 61f6839..fa2fc55 100644 --- a/Swift/FlexGrid101/FlexGrid101/SelectionModesController.swift +++ b/Swift/FlexGrid101/FlexGrid101/SelectionModesController.swift @@ -1,79 +1,55 @@ // -// SelectionModesController.swift +// SelectionModesController.h // FlexGrid101 // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit - -class SelectionModesController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource { - - var _selectionModePicker = UIPickerView() - var _flex = FlexGrid() - var _pickerData = NSMutableArray() - - override func viewDidLoad() { - super.viewDidLoad() +import XuniCoreDynamicKit +import XuniFlexGridDynamicKit - // Do any additional setup after loading the view. - _pickerData = [NSLocalizedString("None", comment: ""), NSLocalizedString("Cell", comment: ""), NSLocalizedString("Cell Range", comment: ""), NSLocalizedString("Row", comment: ""), NSLocalizedString("Row Range", comment: "")] - - _flex.isReadOnly = true - _flex.itemsSource = CustomerData.getCustomerData(100) - - _selectionModePicker.delegate = self - _selectionModePicker.showsSelectionIndicator = true - _selectionModePicker.hidden = false - - self.view.addSubview(_flex) - self.view.addSubview(_selectionModePicker) - } +class SelectionModesController: UIViewController { - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - _flex.frame = CGRectMake(0, 206, self.view.bounds.size.width, (self.view.bounds.size.height-206)) - _selectionModePicker.frame = CGRectMake(self.view.bounds.size.width/4, 44, self.view.bounds.size.width/2, 162) - _flex.setNeedsDisplay() - } - func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int { - return 1 - } - func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { - return _pickerData.count - } - func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { - switch (row) { - case 0: - _flex.selectionMode = FlexSelectionMode.None - case 1: - _flex.selectionMode = FlexSelectionMode.Cell - case 2: - _flex.selectionMode = FlexSelectionMode.CellRange - case 3: - _flex.selectionMode = FlexSelectionMode.Row - case 4: - _flex.selectionMode = FlexSelectionMode.RowRange - default: - break; + @IBAction func modeSwitched(sender: AnyObject) { + let row: Int = self.modeSwitch.selectedSegmentIndex + if row == 0 { + self.flex.selectionMode = GridSelectionMode.None + } + else if row == 1 { + self.flex.selectionMode = GridSelectionMode.Cell } + else if row == 2 { + self.flex.selectionMode = GridSelectionMode.CellRange + } + else if row == 3 { + self.flex.selectionMode = GridSelectionMode.Row + } + else if row == 4 { + self.flex.selectionMode = GridSelectionMode.RowRange + } + } - - func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { - return _pickerData.objectAtIndex(row) as? String - } /* - // MARK: - Navigation - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + override func viewDidLoad() { + super.viewDidLoad() + self.flex.isReadOnly = true + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.selectionMode = GridSelectionMode.None + self.flex.itemsSource = NSMutableArray(array:CustomerData.getCustomerData(100)) + self.flex.flexGridSelectionChanged.addHandler({(eventContainer: XuniEventContainer!) -> Void in + let selected = self.flex.selection.columnSpan * self.flex.selection.rowSpan + self.selectedCount.title = "\(selected) selected" + }, forObject: self) } - */ + @IBOutlet weak var flex: FlexGrid! + @IBOutlet weak var modeSwitch: UISegmentedControl! + @IBOutlet weak var selected: UIBarButtonItem! + @IBOutlet weak var selectedCount: UIBarButtonItem! } +// +// SelectionModesController.m +// FlexGrid101 +// +// Copyright (c) 2015 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/StarSizingController.swift b/Swift/FlexGrid101/FlexGrid101/StarSizingController.swift index b5b45a5..533cb37 100644 --- a/Swift/FlexGrid101/FlexGrid101/StarSizingController.swift +++ b/Swift/FlexGrid101/FlexGrid101/StarSizingController.swift @@ -1,77 +1,47 @@ // -// StarSizingController.swift +// StarSizingController.h // FlexGrid101 // // Copyright © 2015 GrapeCity. All rights reserved. // - import UIKit -import XuniFlexGridKit +import XuniFlexGridDynamicKit class StarSizingController: UIViewController { - var flex = FlexGrid() override func viewDidLoad() { super.viewDidLoad() - - flex.columnHeaderFont = UIFont.boldSystemFontOfSize(flex.columnHeaderFont.pointSize) - flex.autoGenerateColumns = false - let c1: FlexColumn = FlexColumn() - c1.binding = "customerID" - c1.header = NSLocalizedString("ID", comment: "") - c1.widthType = FlexColumnWidth.Star - c1.width = 1 - let c2: FlexColumn = FlexColumn() - c2.binding = "firstName" - c2.header = NSLocalizedString("First Name", comment: "") - c2.widthType = FlexColumnWidth.Star + self.flex.columnHeaderFont = UIFont.boldSystemFontOfSize(self.flex.columnHeaderFont.pointSize) + self.flex.autoGenerateColumns = false + let c1: GridColumn = GridColumn() + c1.binding = "firstName" + c1.header = NSLocalizedString("First Name", comment:"") + c1.widthType = GridColumnWidth.Star + c1.width = 3 + let c2: GridColumn = GridColumn() + c2.binding = "lastName" + c2.header = NSLocalizedString("Last Name", comment:"") + c2.widthType = GridColumnWidth.Star c2.width = 3 - let c3: FlexColumn = FlexColumn() - c3.binding = "lastName" - c3.header = NSLocalizedString("Last Name", comment: "") - c3.widthType = FlexColumnWidth.Star - c3.width = 3 - let c4: FlexColumn = FlexColumn() + let c3: GridColumn = GridColumn() + c3.binding = "lastOrderDate" + c3.header = NSLocalizedString("Last Date", comment:"") + c3.widthType = GridColumnWidth.Star + c3.width = 2 + let c4: GridColumn = GridColumn() c4.binding = "orderTotal" - c4.header = NSLocalizedString("Total", comment: "") + c4.header = NSLocalizedString("Total", comment:"") c4.format = "C" - c4.widthType = FlexColumnWidth.Star + c4.headerHorizontalAlignment = .Left + c4.widthType = GridColumnWidth.Star c4.width = 2 - flex.columns.addObject(c1) - flex.columns.addObject(c2) - flex.columns.addObject(c3) - flex.columns.addObject(c4) - flex.itemsSource = CustomerData.getCustomerData(100) - flex.isReadOnly = true - flex.tag = 1 - self.view.addSubview(flex) - - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - if (self.navigationController == nil) {return;} - - let ss = UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.intrinsicContentSize().height; - - flex.frame = CGRectMake(0, ss, self.view.bounds.size.width, self.view.bounds.size.height - ss) - flex.setNeedsDisplay() - } - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using segue.destinationViewController. - // Pass the selected object to the new view controller. + self.flex.columns.addObject(c1) + self.flex.columns.addObject(c2) + self.flex.columns.addObject(c3) + self.flex.columns.addObject(c4) + self.flex.itemsSource = NSMutableArray(array: CustomerData.getCustomerData(100)) + self.flex.isReadOnly = true } - */ -} + @IBOutlet weak var flex: FlexGrid! +} \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/UnboundSampleViewController.swift b/Swift/FlexGrid101/FlexGrid101/UnboundSampleViewController.swift new file mode 100644 index 0000000..c8160e2 --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/UnboundSampleViewController.swift @@ -0,0 +1,69 @@ +// +// UnboundSampleViewController.h +// FlexGrid101 +// +// Created by Mykola Kotyuck on 16.06.16. +// Copyright © 2016 GrapeCity. All rights reserved. +// +import UIKit +import XuniFlexGridDynamicKit + +class UnboundSampleViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // allow merging + self.grid.allowMerging = GridAllowMerging.All + // add rows/columns to the unbound grid + for _ in 0 ..< 12 { + grid.columns.addObject(GridColumn()) + } + for _ in 0 ..< 500 { + grid.rows.addObject(GridRow()) + } + // populate the unbound grid with some stuff + for r:UInt in 0 ..< grid.rows.count { + for c:UInt in 0 ..< grid.columns.count { + self.grid.setCellData("cell [\(r), \(c)]", forRow: Int32(r), inColumn: Int32(c)) + } + } + // set unbound column headers + let ch: GridPanel = grid.columnHeaders + ch.rows.addObject(GridRow()) + // one header row for years, one for quarters + for c:UInt in 0 ..< ch.columns.count { + ch[0][Int32(c)] = 2016 + c / 4 + // year + ch[1][Int32(c)] = "Q \(c % 4 + 1)" + // quarter + } + // allow merging the first fixed row + (ch.rows[Int32(0)] as! GridRow).allowMerging = true + // set unbound row headers + let rh: GridPanel = grid.rowHeaders + rh.columns.addObject(GridColumn()) + for c:UInt in 0 ..< rh.columns.count { + (rh.columns[Int32(c)] as! GridColumn).width = 60 + for r:UInt in 0 ..< rh.rows.count { + rh[Int32(r)][Int32(c)] = "hdr \(c == 0 ? r / 2 : r), \(c)" + } + } + // allow merging the first fixed column + (rh.columns[Int32(0)] as! GridColumn).allowMerging = true + grid.autoSizeColumns(0, to: 1, header: true) + grid.autoSizeColumns() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + @IBOutlet weak var grid: FlexGrid! +} +// +// UnboundSampleViewController.m +// FlexGrid101 +// +// Created by Mykola Kotyuck on 16.06.16. +// Copyright © 2016 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/YouTubeCollectionView.swift b/Swift/FlexGrid101/FlexGrid101/YouTubeCollectionView.swift new file mode 100644 index 0000000..27610f0 --- /dev/null +++ b/Swift/FlexGrid101/FlexGrid101/YouTubeCollectionView.swift @@ -0,0 +1,73 @@ +// +// YouTubeCollectionView.h +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// +import UIKit +import XuniCoreDynamicKit +class YouTubeCollectionView: XuniCursorCollectionView { + var query: String + + var orderBy: String + + + init(query: String, orderBy: String) { + self.query = query + self.orderBy = orderBy + self.pageToken = "" + super.init() + } + + override func hasMoreItems() -> Bool { + return true + } + + override func itemGetter(desiredNumber: NSNumber!) -> NSMutableArray! + { + let dataToAppend = NSMutableArray() + + let urlAddress: String = "https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&q=\(query.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLHostAllowedCharacterSet())!)&order=\(orderBy)&maxResults=\(desiredNumber)\(NSString(string: pageToken).length==0 ? "&pageToken=\(pageToken)" : "")&key=\("AIzaSyDFz8V9U0ccKXQ5oSrcRSoHqpaursqOudo")" + + let dataResult: NSData! = NSData(contentsOfURL: NSURL(string: urlAddress)!) + + if(dataResult == nil) + { + return dataToAppend + } + + let object: AnyObject! = try! NSJSONSerialization.JSONObjectWithData(dataResult, options: NSJSONReadingOptions()) + + if (object is NSDictionary) { + let results: NSDictionary = object as! NSDictionary + self.pageToken = (results["nextPageToken"] as! String) + + let items: NSMutableArray = (results["items"] as! NSMutableArray) + + for index in 0 ..< items.count { + let dict = items[index] as! NSDictionary + let title: NSString = dict.valueForKeyPath("snippet.title") as! NSString + let description: NSString = dict.valueForKeyPath("snippet.description") as! NSString + let sample: SampleData = SampleData(title: title.description, subtitle: description.description) + sample.channelTitle = dict.valueForKeyPath("snippet.channelTitle") as! String + sample.thumbnail = dict.valueForKeyPath("snippet.thumbnails.default.url") as! String + + let vidid = dict.valueForKeyPath("id.videoId") as! String + sample.link = "http://www.youtube.com/watch?v=\(vidid)" + dataToAppend.addObject(sample) + + } + } + + return dataToAppend + + } + + var pageToken: String +} +// +// YouTubeCollectionView.m +// CollectionView101 +// +// Copyright © 2016 GrapeCity. All rights reserved. +// \ No newline at end of file diff --git a/Swift/FlexGrid101/FlexGrid101/flexgrid_headers.png b/Swift/FlexGrid101/FlexGrid101/flexgrid_headers.png new file mode 100644 index 0000000..5ff47b3 Binary files /dev/null and b/Swift/FlexGrid101/FlexGrid101/flexgrid_headers.png differ diff --git a/Swift/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings b/Swift/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings index 4c3f625..6ce77da 100644 --- a/Swift/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings +++ b/Swift/FlexGrid101/FlexGrid101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ -/* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +/* Class = "UILabel"; text = "FlexGrid101"; ObjectID = "9OV-Zx-N0E"; */ +"9OV-Zx-N0E.text" = "FlexGrid101"; -/* Class = "UILabel"; text = "FlexGrid101"; ObjectID = "kId-c2-rCX"; */ -"kId-c2-rCX.text" = "FlexGrid101"; +/* Class = "UILabel"; text = " Copyright (c) 2016 GrapeCity. All rights reserved."; ObjectID = "yI0-Lc-fAb"; */ +"yI0-Lc-fAb.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; diff --git a/Swift/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings b/Swift/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings index 7137ac2..569de8e 100644 --- a/Swift/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings +++ b/Swift/FlexGrid101/FlexGrid101/ja.lproj/Localizable.strings @@ -2,7 +2,7 @@ Localizable.strings FlexGrid101 - Copyright © 2015 GrapeCity. All rights reserved. + Copyright (c) 2015 GrapeCity. All rights reserved. */ "On Demand Loading" = "ロードオンデマンド"; @@ -44,4 +44,11 @@ "Total" = "合計"; "Count" = "件数"; "Edit Columns" = "表示列の構成を編集"; -"Done" = "完了"; \ No newline at end of file +"Done" = "完了"; +"Monday" = "月曜日"; +"Tuesday" = "火曜日"; +"Wednesday" = "水曜日"; +"Thursday" = "木曜日"; +"Friday" = "金曜日"; +"Saturday" = "土曜日"; +"Sunday" = "日曜日"; diff --git a/Swift/FlexGrid101/FlexGrid101/ja.lproj/Main.strings b/Swift/FlexGrid101/FlexGrid101/ja.lproj/Main.strings index 42ca519..186ab3c 100644 --- a/Swift/FlexGrid101/FlexGrid101/ja.lproj/Main.strings +++ b/Swift/FlexGrid101/FlexGrid101/ja.lproj/Main.strings @@ -1,39 +1,255 @@ +/* Class = "UILabel"; text = "Display, edit and aggregate your data all at once with FlexGrid"; ObjectID = "04q-Qk-1Uw"; */ +"04q-Qk-1Uw.text" = "Display, edit and aggregate your data all at once with FlexGrid"; + +/* Class = "UILabel"; text = "Expand and collapse row details"; ObjectID = "06n-gc-HrI"; */ +"06n-gc-HrI.text" = "Expand and collapse row details"; + /* Class = "UILabel"; text = "Address"; ObjectID = "1eT-oW-hrf"; */ -"1eT-oW-hrf.text" = "住所(Address)"; +"1eT-oW-hrf.text" = "Address"; /* Class = "UILabel"; text = "Cancel"; ObjectID = "27j-QJ-v3z"; */ -"27j-QJ-v3z.text" = "キャンセル"; +"27j-QJ-v3z.text" = "Cancel"; + +/* Class = "UILabel"; text = "Filter"; ObjectID = "2LZ-vR-psM"; */ +"2LZ-vR-psM.text" = "Filter"; + +/* Class = "UILabel"; text = "Custom Cells"; ObjectID = "2Th-7C-8LJ"; */ +"2Th-7C-8LJ.text" = "Custom Cells"; + +/* Class = "UILabel"; text = "Cell Freezing&Merging"; ObjectID = "2gG-ng-mWe"; */ +"2gG-ng-mWe.text" = "Cell Freezing&Merging"; + +/* Class = "UINavigationItem"; title = "Star Sizing"; ObjectID = "3qT-IC-ym1"; */ +"3qT-IC-ym1.title" = "Star Sizing"; /* Class = "UILabel"; text = "City"; ObjectID = "3zE-V2-2FJ"; */ -"3zE-V2-2FJ.text" = "都市(City)"; +"3zE-V2-2FJ.text" = "City"; + +/* Class = "UILabel"; text = "Shows the various cell selection modes"; ObjectID = "4tS-YM-9aG"; */ +"4tS-YM-9aG.text" = "Shows the various cell selection modes"; + +/* Class = "UILabel"; text = ">"; ObjectID = "AA4-TE-lHv"; */ +"AA4-TE-lHv.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "BGo-Hy-EXj"; */ +"BGo-Hy-EXj.text" = ">"; + +/* Class = "UINavigationItem"; title = "On Demand"; ObjectID = "BlD-bH-UCJ"; */ +"BlD-bH-UCJ.title" = "On Demand"; + +/* Class = "UINavigationItem"; title = "Getting Started"; ObjectID = "Bmk-c4-cSH"; */ +"Bmk-c4-cSH.title" = "Getting Started"; + +/* Class = "UILabel"; text = "Groups and aggregates a collection of videos"; ObjectID = "DJX-fJ-Pwm"; */ +"DJX-fJ-Pwm.text" = "Groups and aggregates a collection of videos"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[0] = "None"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[0]" = "None"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[1] = "Cell"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[1]" = "Cell"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[2] = "CellRange"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[2]" = "CellRange"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[3] = "Row"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[3]" = "Row"; + +/* Class = "UISegmentedControl"; DNg-23-xSo.segmentTitles[4] = "RowRange"; ObjectID = "DNg-23-xSo"; */ +"DNg-23-xSo.segmentTitles[4]" = "RowRange"; + +/* Class = "UILabel"; text = ">"; ObjectID = "GPg-el-nwa"; */ +"GPg-el-nwa.text" = ">"; -/* Class = "UINavigationItem"; title = "FlexGrid101"; ObjectID = "Gnw-bn-nSm"; */ -"Gnw-bn-nSm.title" = "FlexGrid101"; +/* Class = "UILabel"; text = ">"; ObjectID = "Hgo-7Q-HXe"; */ +"Hgo-7Q-HXe.text" = ">"; -/* Class = "UIBarButtonItem"; title = "FlexGrid101"; ObjectID = "Kll-7W-u7d"; */ -"Kll-7W-u7d.title" = "FlexGrid101"; +/* Class = "UINavigationItem"; title = "Freezing&Merging"; ObjectID = "I2u-HG-HDn"; */ +"I2u-HG-HDn.title" = "Freezing&Merging"; + +/* Class = "UILabel"; text = "Shows a grid with custom cell merging"; ObjectID = "IHh-tS-Qvb"; */ +"IHh-tS-Qvb.text" = "Shows a grid with custom cell merging"; + +/* Class = "UILabel"; text = "Edit cells by input form rather than inline"; ObjectID = "Jnc-m9-pHa"; */ +"Jnc-m9-pHa.text" = "Edit cells by input form rather than inline"; + +/* Class = "UILabel"; text = "Customizes a cell by displaying a numeric value in a gauge"; ObjectID = "Jqb-XX-nWX"; */ +"Jqb-XX-nWX.text" = "Customizes a cell by displaying a numeric value in a gauge"; + +/* Class = "UILabel"; text = ">"; ObjectID = "LUH-fq-7yE"; */ +"LUH-fq-7yE.text" = ">"; /* Class = "UILabel"; text = "E-Mail"; ObjectID = "MSp-cY-cG9"; */ -"MSp-cY-cG9.text" = "メール(E-Mail)"; +"MSp-cY-cG9.text" = "E-Mail"; + +/* Class = "UILabel"; text = "Edit Confirmation"; ObjectID = "Mh8-MY-tUv"; */ +"Mh8-MY-tUv.text" = "Edit Confirmation"; + +/* Class = "UILabel"; text = "Shows how to prompt the user with a confirmation dialog before committing changes to a cell"; ObjectID = "N9S-vR-gzU"; */ +"N9S-vR-gzU.text" = "Shows how to prompt the user with a confirmation dialog before committing changes to a cell"; + +/* Class = "UILabel"; text = "Column Layout"; ObjectID = "NDk-U5-GbB"; */ +"NDk-U5-GbB.text" = "Column Layout"; + +/* Class = "UILabel"; text = ">"; ObjectID = "NbF-kJ-Na8"; */ +"NbF-kJ-Na8.text" = ">"; + +/* Class = "UINavigationItem"; title = "Custom Merging"; ObjectID = "PAA-vu-4Dw"; */ +"PAA-vu-4Dw.title" = "Custom Merging"; + +/* Class = "UILabel"; text = "Selection Modes"; ObjectID = "Pgu-0Z-VMV"; */ +"Pgu-0Z-VMV.text" = "Selection Modes"; + +/* Class = "UILabel"; text = "Filters and highlights the data across all columns"; ObjectID = "Qk7-tT-4qi"; */ +"Qk7-tT-4qi.text" = "Filters and highlights the data across all columns"; + +/* Class = "UILabel"; text = "Rotate the device to see star-sizing in action"; ObjectID = "QkN-hJ-IoU"; */ +"QkN-hJ-IoU.text" = "Rotate the device to see star-sizing in action"; + +/* Class = "UIBarButtonItem"; title = "Edit"; ObjectID = "QoG-Dk-6QL"; */ +"QoG-Dk-6QL.title" = "Edit"; + +/* Class = "UITableViewController"; title = "FlexGrid101"; ObjectID = "Qz0-jK-VdE"; */ +"Qz0-jK-VdE.title" = "FlexGrid101"; /* Class = "UILabel"; text = "Country"; ObjectID = "R1X-wj-bQr"; */ -"R1X-wj-bQr.text" = "国(Country)"; +"R1X-wj-bQr.text" = "Country"; /* Class = "UILabel"; text = "First Name"; ObjectID = "R5M-4S-gmw"; */ -"R5M-4S-gmw.text" = "名(First Name)"; +"R5M-4S-gmw.text" = "First Name"; + +/* Class = "UILabel"; text = "Here you will see the timetable"; ObjectID = "VU5-qF-FzC"; */ +"VU5-qF-FzC.text" = "Here you will see the timetable"; + +/* Class = "UILabel"; text = ">"; ObjectID = "WQg-a8-FOy"; */ +"WQg-a8-FOy.text" = ">"; + +/* Class = "UILabel"; text = "On Demand"; ObjectID = "WUb-mq-rHk"; */ +"WUb-mq-rHk.text" = "On Demand"; /* Class = "UILabel"; text = "Confirm editing"; ObjectID = "ZXh-Mv-kdZ"; */ -"ZXh-Mv-kdZ.text" = "編集の完了"; +"ZXh-Mv-kdZ.text" = "Confirm editing"; + +/* Class = "UINavigationItem"; title = "Edit Confirmation"; ObjectID = "Zhz-qw-39u"; */ +"Zhz-qw-39u.title" = "Edit Confirmation"; /* Class = "UILabel"; text = "Last Name"; ObjectID = "at8-vu-Ft0"; */ -"at8-vu-Ft0.text" = "姓(Last Name)"; +"at8-vu-Ft0.text" = "Last Name"; + +/* Class = "UILabel"; text = "Select TV show"; ObjectID = "b5w-4m-Jz3"; */ +"b5w-4m-Jz3.text" = "Select TV show"; + +/* Class = "UILabel"; text = ">"; ObjectID = "bil-EV-iKd"; */ +"bil-EV-iKd.text" = ">"; + +/* Class = "UILabel"; text = "Star Sizing"; ObjectID = "cCB-Mg-zy9"; */ +"cCB-Mg-zy9.text" = "Star Sizing"; + +/* Class = "UILabel"; text = ">"; ObjectID = "cKR-sR-jnu"; */ +"cKR-sR-jnu.text" = ">"; + +/* Class = "UILabel"; text = "Row Details"; ObjectID = "dsU-dQ-3PQ"; */ +"dsU-dQ-3PQ.text" = "Row Details"; /* Class = "UILabel"; text = ">"; ObjectID = "ein-f6-TS0"; */ "ein-f6-TS0.text" = ">"; +/* Class = "UILabel"; text = ">"; ObjectID = "fAw-eT-abh"; */ +"fAw-eT-abh.text" = ">"; + +/* Class = "UINavigationItem"; title = "Row Details"; ObjectID = "fPn-ol-nxW"; */ +"fPn-ol-nxW.title" = "Row Details"; + +/* Class = "UINavigationItem"; title = "FlexGrid101"; ObjectID = "fQI-FH-RiG"; */ +"fQI-FH-RiG.title" = "FlexGrid101"; + +/* Class = "UINavigationItem"; title = "Conditional Formatting"; ObjectID = "gGM-lt-hc6"; */ +"gGM-lt-hc6.title" = "Conditional Formatting"; + +/* Class = "UILabel"; text = "Uses a CellFactory to apply conditional formatting"; ObjectID = "gcv-bk-jWC"; */ +"gcv-bk-jWC.text" = "Uses a CellFactory to apply conditional formatting"; + +/* Class = "UINavigationItem"; title = "Column Definitions"; ObjectID = "htf-Gy-By7"; */ +"htf-Gy-By7.title" = "Column Definitions"; + +/* Class = "UIBarButtonItem"; title = "0 selected"; ObjectID = "iIA-Df-AaM"; */ +"iIA-Df-AaM.title" = "0 selected"; + +/* Class = "UILabel"; text = "Conditional Formatting"; ObjectID = "if5-fG-b6E"; */ +"if5-fG-b6E.text" = "Conditional Formatting"; + +/* Class = "UINavigationItem"; title = "Editing Form"; ObjectID = "ig5-aS-Vgh"; */ +"ig5-aS-Vgh.title" = "Editing Form"; + +/* Class = "UILabel"; text = "Shows frozen columns, rows and cell merging"; ObjectID = "iwq-wR-ahB"; */ +"iwq-wR-ahB.text" = "Shows frozen columns, rows and cell merging"; + +/* Class = "UILabel"; text = ">"; ObjectID = "jaL-e6-fOw"; */ +"jaL-e6-fOw.text" = ">"; + +/* Class = "UILabel"; text = ">"; ObjectID = "k2d-IG-BPG"; */ +"k2d-IG-BPG.text" = ">"; + +/* Class = "UILabel"; text = "Filters the data by columns through a generated form"; ObjectID = "kcb-VB-G0j"; */ +"kcb-VB-G0j.text" = "Filters the data by columns through a generated form"; + +/* Class = "UILabel"; text = "Getting Started"; ObjectID = "lev-La-dSM"; */ +"lev-La-dSM.text" = "Getting Started"; + +/* Class = "UILabel"; text = "Grouping"; ObjectID = "mTY-Nq-vjh"; */ +"mTY-Nq-vjh.text" = "Grouping"; + +/* Class = "UILabel"; text = ">"; ObjectID = "nLJ-ZY-wYK"; */ +"nLJ-ZY-wYK.text" = ">"; + +/* Class = "UILabel"; text = "Editing Form"; ObjectID = "oUW-Ec-gDn"; */ +"oUW-Ec-gDn.text" = "Editing Form"; + +/* Class = "UILabel"; text = ">"; ObjectID = "pBF-A7-DwK"; */ +"pBF-A7-DwK.text" = ">"; + +/* Class = "UINavigationItem"; title = "Custom Cells"; ObjectID = "qfI-an-dEx"; */ +"qfI-an-dEx.title" = "Custom Cells"; + /* Class = "UILabel"; text = ">"; ObjectID = "r46-Kv-t99"; */ "r46-Kv-t99.text" = ">"; +/* Class = "UILabel"; text = ">"; ObjectID = "sIH-X3-Yo3"; */ +"sIH-X3-Yo3.text" = ">"; + +/* Class = "UILabel"; text = "Column Definitions"; ObjectID = "sYt-Cd-lig"; */ +"sYt-Cd-lig.text" = "Column Definitions"; + /* Class = "UILabel"; text = "Edit the Object"; ObjectID = "syX-hS-ICg"; */ -"syX-hS-ICg.text" = "内容を編集"; +"syX-hS-ICg.text" = "Edit the Object"; + +/* Class = "UILabel"; text = "Custom Merging"; ObjectID = "tmz-Ut-Msh"; */ +"tmz-Ut-Msh.text" = "Custom Merging"; + +/* Class = "UINavigationItem"; title = "Selection Modes"; ObjectID = "ump-jf-AN4"; */ +"ump-jf-AN4.title" = "Selection Modes"; + +/* Class = "UINavigationController"; title = "FlexGrid101"; ObjectID = "vQy-oz-8OE"; */ +"vQy-oz-8OE.title" = "FlexGrid101"; + +/* Class = "UINavigationItem"; title = "Grouping"; ObjectID = "vfQ-bd-Mgq"; */ +"vfQ-bd-Mgq.title" = "Grouping"; + +/* Class = "UILabel"; text = "Shows a custom column manager to modify column layout"; ObjectID = "wKr-Ae-bKg"; */ +"wKr-Ae-bKg.text" = "Shows a custom column manager to modify column layout"; + +/* Class = "UILabel"; text = ">"; ObjectID = "wZw-ZU-IA6"; */ +"wZw-ZU-IA6.text" = ">"; + +/* Class = "UILabel"; text = "Load items on demand as the user scrolls down the grid"; ObjectID = "xhb-NF-nFn"; */ +"xhb-NF-nFn.text" = "Load items on demand as the user scrolls down the grid"; + +/* Class = "UINavigationItem"; title = "Full Text Filter"; ObjectID = "yEw-h4-u6W"; */ +"yEw-h4-u6W.title" = "Full Text Filter"; + +/* Class = "UILabel"; text = "Shows how to specify and format columns"; ObjectID = "ycB-vo-am7"; */ +"ycB-vo-am7.text" = "Shows how to specify and format columns"; + +/* Class = "UILabel"; text = "Full Text Filter"; ObjectID = "zKl-cD-EzG"; */ +"zKl-cD-EzG.text" = "Full Text Filter"; diff --git a/Swift/FlexGrid101/FlexGrid101Tests/FlexGrid101Tests.swift b/Swift/FlexGrid101/FlexGrid101Tests/FlexGrid101Tests.swift index 6cddf1f..16eb076 100644 --- a/Swift/FlexGrid101/FlexGrid101Tests/FlexGrid101Tests.swift +++ b/Swift/FlexGrid101/FlexGrid101Tests/FlexGrid101Tests.swift @@ -1,35 +1,32 @@ // -// FlexGrid101Tests.swift +// FlexGrid101Tests.m // FlexGrid101Tests // // Copyright (c) 2015 GrapeCity. All rights reserved. // - import UIKit import XCTest - class FlexGrid101Tests: XCTestCase { - + override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } - + override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } - + func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } - + func testPerformanceExample() { // This is an example of a performance test case. - self.measureBlock() { + self.measureBlock({() -> Void in // Put the code you want to measure the time of here. - } + }) } - -} +} \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101.xcodeproj/project.pbxproj b/Swift/Gauges101/Gauges101.xcodeproj/project.pbxproj index 095096b..7573a12 100644 --- a/Swift/Gauges101/Gauges101.xcodeproj/project.pbxproj +++ b/Swift/Gauges101/Gauges101.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 4C4796081D30263700BD39C9 /* XuniGaugeDesignTimeStoryboardSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4796071D30263700BD39C9 /* XuniGaugeDesignTimeStoryboardSupport.swift */; }; 4C5FF2B11C49565E008794F4 /* gauge_basic.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF2A31C49565D008794F4 /* gauge_basic.png */; }; 4C5FF2B21C49565E008794F4 /* gauge_bullet.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF2A41C49565E008794F4 /* gauge_bullet.png */; }; 4C5FF2B31C49565E008794F4 /* gauge_linear.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF2A51C49565E008794F4 /* gauge_linear.png */; }; @@ -24,12 +25,16 @@ 4C5FF2C01C4957C0008794F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF2C21C4957C0008794F4 /* Main.storyboard */; }; 4C5FF2C51C4957C8008794F4 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5FF2C71C4957C8008794F4 /* LaunchScreen.xib */; }; 4C862F731C07717600EA942C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C862F751C07717600EA942C /* Localizable.strings */; }; + 4CC37CAE1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAC1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework */; }; + 4CC37CAF1D2A66D000DF85BC /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAD1D2A66D000DF85BC /* XuniCoreDynamicKit.framework */; }; + 4CC37CB01D2A66D500DF85BC /* XuniGaugeDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAC1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework */; }; + 4CC37CB11D2A66D500DF85BC /* XuniGaugeDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAC1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4CC37CB21D2A66D500DF85BC /* XuniCoreDynamicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAD1D2A66D000DF85BC /* XuniCoreDynamicKit.framework */; }; + 4CC37CB31D2A66D500DF85BC /* XuniCoreDynamicKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC37CAD1D2A66D000DF85BC /* XuniCoreDynamicKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; F23573621B4441F400F300D7 /* License.swift in Sources */ = {isa = PBXBuildFile; fileRef = F23573611B4441F400F300D7 /* License.swift */; }; F28241B71B39A6DA00B72CBE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28241B61B39A6DA00B72CBE /* AppDelegate.swift */; }; F28241BE1B39A6DA00B72CBE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F28241BD1B39A6DA00B72CBE /* Images.xcassets */; }; F28241CD1B39A6DA00B72CBE /* Gauges101Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28241CC1B39A6DA00B72CBE /* Gauges101Tests.swift */; }; - F28241D91B39C5DB00B72CBE /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28241D81B39C5DB00B72CBE /* XuniCoreKit.framework */; }; - F28241DB1B39C60000B72CBE /* XuniGaugeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28241DA1B39C60000B72CBE /* XuniGaugeKit.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,7 +47,23 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4CC37CB41D2A66D500DF85BC /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4CC37CB31D2A66D500DF85BC /* XuniCoreDynamicKit.framework in Embed Frameworks */, + 4CC37CB11D2A66D500DF85BC /* XuniGaugeDynamicKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 4C4796071D30263700BD39C9 /* XuniGaugeDesignTimeStoryboardSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XuniGaugeDesignTimeStoryboardSupport.swift; path = ../../../Controls/XuniGaugeDesignTimeStoryboardSupport.swift; sourceTree = ""; }; 4C5FF2A31C49565D008794F4 /* gauge_basic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gauge_basic.png; sourceTree = ""; }; 4C5FF2A41C49565E008794F4 /* gauge_bullet.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gauge_bullet.png; sourceTree = ""; }; 4C5FF2A51C49565E008794F4 /* gauge_linear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gauge_linear.png; sourceTree = ""; }; @@ -63,6 +84,8 @@ 4C5FF2C91C4957D3008794F4 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; 4C862F741C07717600EA942C /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 4C862F761C07717B00EA942C /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + 4CC37CAC1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeDynamicKit.framework; path = ../../../Controls/XuniGaugeDynamicKit.framework; sourceTree = ""; }; + 4CC37CAD1D2A66D000DF85BC /* XuniCoreDynamicKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreDynamicKit.framework; path = ../../../Controls/XuniCoreDynamicKit.framework; sourceTree = ""; }; F23573611B4441F400F300D7 /* License.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = License.swift; sourceTree = ""; }; F28241B11B39A6DA00B72CBE /* Gauges101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Gauges101.app; sourceTree = BUILT_PRODUCTS_DIR; }; F28241B51B39A6DA00B72CBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -71,8 +94,6 @@ F28241C61B39A6DA00B72CBE /* Gauges101Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Gauges101Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F28241CB1B39A6DA00B72CBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F28241CC1B39A6DA00B72CBE /* Gauges101Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gauges101Tests.swift; sourceTree = ""; }; - F28241D81B39C5DB00B72CBE /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = "../../../Controls/XuniCoreKit.framework"; sourceTree = ""; }; - F28241DA1B39C60000B72CBE /* XuniGaugeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniGaugeKit.framework; path = "../../../Controls/XuniGaugeKit.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,8 +101,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F28241D91B39C5DB00B72CBE /* XuniCoreKit.framework in Frameworks */, - F28241DB1B39C60000B72CBE /* XuniGaugeKit.framework in Frameworks */, + 4CC37CAF1D2A66D000DF85BC /* XuniCoreDynamicKit.framework in Frameworks */, + 4CC37CAE1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework in Frameworks */, + 4CC37CB21D2A66D500DF85BC /* XuniCoreDynamicKit.framework in Frameworks */, + 4CC37CB01D2A66D500DF85BC /* XuniGaugeDynamicKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -111,8 +134,9 @@ F28241A81B39A6DA00B72CBE = { isa = PBXGroup; children = ( - F28241DA1B39C60000B72CBE /* XuniGaugeKit.framework */, - F28241D81B39C5DB00B72CBE /* XuniCoreKit.framework */, + 4C4796071D30263700BD39C9 /* XuniGaugeDesignTimeStoryboardSupport.swift */, + 4CC37CAC1D2A66D000DF85BC /* XuniGaugeDynamicKit.framework */, + 4CC37CAD1D2A66D000DF85BC /* XuniCoreDynamicKit.framework */, F28241B31B39A6DA00B72CBE /* Gauges101 */, F28241C91B39A6DA00B72CBE /* Gauges101Tests */, F28241B21B39A6DA00B72CBE /* Products */, @@ -186,6 +210,7 @@ F28241AD1B39A6DA00B72CBE /* Sources */, F28241AE1B39A6DA00B72CBE /* Frameworks */, F28241AF1B39A6DA00B72CBE /* Resources */, + 4CC37CB41D2A66D500DF85BC /* Embed Frameworks */, ); buildRules = ( ); @@ -290,6 +315,7 @@ 4C5FF2BE1C49565E008794F4 /* XGUsingRangesViewController.swift in Sources */, 4C5FF2B91C49565E008794F4 /* XGBulletGraphViewController.swift in Sources */, 4C5FF2B71C49565E008794F4 /* XGAnimationViewController.swift in Sources */, + 4C4796081D30263700BD39C9 /* XuniGaugeDesignTimeStoryboardSupport.swift in Sources */, 4C5FF2BD1C49565E008794F4 /* XGGettingStartedViewController.swift in Sources */, 4C5FF2B81C49565E008794F4 /* XGAutomaticScalingViewController.swift in Sources */, F28241B71B39A6DA00B72CBE /* AppDelegate.swift in Sources */, diff --git a/Swift/Gauges101/Gauges101/AppDelegate.swift b/Swift/Gauges101/Gauges101/AppDelegate.swift index eef2f91..3d089be 100644 --- a/Swift/Gauges101/Gauges101/AppDelegate.swift +++ b/Swift/Gauges101/Gauges101/AppDelegate.swift @@ -6,7 +6,7 @@ // import UIKit -import XuniCoreKit +import XuniCoreDynamicKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { diff --git a/Swift/Gauges101/Gauges101/Base.lproj/Main.storyboard b/Swift/Gauges101/Gauges101/Base.lproj/Main.storyboard index 5bbc297..37da480 100644 --- a/Swift/Gauges101/Gauges101/Base.lproj/Main.storyboard +++ b/Swift/Gauges101/Gauges101/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -39,7 +39,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -536,9 +536,8 @@ - + - @@ -614,9 +613,8 @@ - + - @@ -640,9 +638,8 @@ - + - @@ -678,9 +675,8 @@ - + - diff --git a/Swift/Gauges101/Gauges101/XGAnimationViewController.swift b/Swift/Gauges101/Gauges101/XGAnimationViewController.swift index ecd8573..c5f52c2 100644 --- a/Swift/Gauges101/Gauges101/XGAnimationViewController.swift +++ b/Swift/Gauges101/Gauges101/XGAnimationViewController.swift @@ -5,7 +5,7 @@ // Copyright © 2016 GrapeCity. All rights reserved. // import UIKit -import XuniGaugeKit +import XuniGaugeDynamicKit class XGAnimationViewController: UIViewController { @@ -95,4 +95,4 @@ class XGAnimationViewController: UIViewController { // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit \ No newline at end of file +import XuniGaugeDynamicKit \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/XGAutomaticScalingViewController.swift b/Swift/Gauges101/Gauges101/XGAutomaticScalingViewController.swift index 4d2526d..7363ca8 100644 --- a/Swift/Gauges101/Gauges101/XGAutomaticScalingViewController.swift +++ b/Swift/Gauges101/Gauges101/XGAutomaticScalingViewController.swift @@ -60,4 +60,4 @@ class XGAutomaticScalingViewController: UIViewController { // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit \ No newline at end of file +import XuniGaugeDynamicKit \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/XGBulletGraphViewController.swift b/Swift/Gauges101/Gauges101/XGBulletGraphViewController.swift index 543b3da..8bc171b 100644 --- a/Swift/Gauges101/Gauges101/XGBulletGraphViewController.swift +++ b/Swift/Gauges101/Gauges101/XGBulletGraphViewController.swift @@ -53,4 +53,4 @@ class XGBulletGraphViewController: UIViewController { // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit \ No newline at end of file +import XuniGaugeDynamicKit \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/XGDirectionViewController.swift b/Swift/Gauges101/Gauges101/XGDirectionViewController.swift index eb7d0fa..0303544 100644 --- a/Swift/Gauges101/Gauges101/XGDirectionViewController.swift +++ b/Swift/Gauges101/Gauges101/XGDirectionViewController.swift @@ -135,4 +135,4 @@ class XGDirectionViewController: UIViewController { // // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit \ No newline at end of file +import XuniGaugeDynamicKit \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/XGDisplayingValuesViewController.swift b/Swift/Gauges101/Gauges101/XGDisplayingValuesViewController.swift index a49bb78..ced812e 100644 --- a/Swift/Gauges101/Gauges101/XGDisplayingValuesViewController.swift +++ b/Swift/Gauges101/Gauges101/XGDisplayingValuesViewController.swift @@ -5,7 +5,7 @@ // Copyright © 2016 GrapeCity. All rights reserved. // import UIKit -import XuniGaugeKit +import XuniGaugeDynamicKit class XGDisplayingValuesViewController: UIViewController { @@ -51,10 +51,12 @@ class XGDisplayingValuesViewController: UIViewController { self.radialGauge.isReadOnly = false self.radialGauge.startAngle = 90 self.radialGauge.sweepAngle = 90 - radialGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + + radialGauge.gaugeValueChanged.addHandler({ (a) in self.valueStepper.value = self.radialGauge.value self.stepperValueChanged(self) - }, forObject: self) + }, forObject: self) + self.linearGauge.min = valueStepper.minimumValue self.linearGauge.max = valueStepper.maximumValue self.linearGauge.value = valueStepper.value @@ -62,7 +64,7 @@ class XGDisplayingValuesViewController: UIViewController { self.linearGauge.updateAnimation.duration = 0.5 self.linearGauge.isReadOnly = false self.linearGauge.backgroundColor = UIColor.clearColor() - linearGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + linearGauge.gaugeValueChanged.addHandler({(a) in self.valueStepper.value = self.linearGauge.value self.stepperValueChanged(self) }, forObject: self) diff --git a/Swift/Gauges101/Gauges101/XGExportImageViewController.swift b/Swift/Gauges101/Gauges101/XGExportImageViewController.swift index e4b886c..24155a7 100644 --- a/Swift/Gauges101/Gauges101/XGExportImageViewController.swift +++ b/Swift/Gauges101/Gauges101/XGExportImageViewController.swift @@ -5,6 +5,8 @@ // Copyright © 2016 GrapeCity. All rights reserved. // import UIKit +import XuniCoreDynamicKit + class XGExportImageViewController: UIViewController { override func viewDidLoad() { @@ -24,7 +26,8 @@ class XGExportImageViewController: UIViewController { func animateNextStep(sender: AnyObject) { let random: Double = Double(Int(arc4random()) % 101) - radialGauge.updateAnimation.easing = XuniEasing.EaseOutElastic() + + //radialGauge.updateAnimation.easing = XuniCoreDynamicKit.XuniEasing.EaseOutElastic() radialGauge.value = random } @@ -52,6 +55,8 @@ class XGExportImageViewController: UIViewController { } let alert: UIAlertView = UIAlertView(title: title, message: message, delegate: nil, cancelButtonTitle: NSLocalizedString("OK",comment:"")) alert.show() + self.radialGauge.hidden = false + self.snapshotDisplay.hidden = true } @IBAction func takeSnapshot(sender: AnyObject) { @@ -78,5 +83,5 @@ class XGExportImageViewController: UIViewController { // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit +import XuniGaugeDynamicKit //#define LOC(A) NSLocalizedString(A, nil) \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/XGGettingStartedViewController.swift b/Swift/Gauges101/Gauges101/XGGettingStartedViewController.swift index 2b688e3..708651d 100644 --- a/Swift/Gauges101/Gauges101/XGGettingStartedViewController.swift +++ b/Swift/Gauges101/Gauges101/XGGettingStartedViewController.swift @@ -5,7 +5,8 @@ // Copyright © 2016 GrapeCity. All rights reserved. // import UIKit -import XuniGaugeKit +import XuniGaugeDynamicKit + class XGGettingStartedViewController: UIViewController { @@ -28,7 +29,7 @@ class XGGettingStartedViewController: UIViewController { self.radialGauge.updateAnimation.duration = 0.5 self.radialGauge.isReadOnly = false self.radialGauge.showText = XuniShowText.None - radialGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + radialGauge.gaugeValueChanged.addHandler({(a) in self.valueStepper.value = self.radialGauge.value self.stepperValueChanged(self) }, forObject: self) @@ -41,7 +42,7 @@ class XGGettingStartedViewController: UIViewController { self.linearGauge.isReadOnly = false - linearGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + linearGauge.gaugeValueChanged.addHandler({(a) -> Void in self.valueStepper.value = self.linearGauge.value self.stepperValueChanged(self) }, forObject: self) @@ -55,7 +56,7 @@ class XGGettingStartedViewController: UIViewController { self.bulletGraph.bad = 45 self.bulletGraph.good = 80 self.bulletGraph.target = 90 - bulletGraph.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + bulletGraph.gaugeValueChanged.addHandler({(a) -> Void in self.valueStepper.value = self.bulletGraph.value self.stepperValueChanged(self) }, forObject: self) diff --git a/Swift/Gauges101/Gauges101/XGUsingRangesViewController.swift b/Swift/Gauges101/Gauges101/XGUsingRangesViewController.swift index f3ee3d3..92e3670 100644 --- a/Swift/Gauges101/Gauges101/XGUsingRangesViewController.swift +++ b/Swift/Gauges101/Gauges101/XGUsingRangesViewController.swift @@ -5,6 +5,9 @@ // Copyright © 2016 GrapeCity. All rights reserved. // import UIKit +import XuniCoreDynamicKit +import XuniGaugeDynamicKit + class XGUsingRangesViewController: UIViewController { @IBAction func stepperValueChanged(sender: AnyObject) { @@ -38,7 +41,7 @@ class XGUsingRangesViewController: UIViewController { self.radialGauge.updateAnimation.duration = 0.5 self.radialGauge.isReadOnly = false - radialGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + radialGauge.gaugeValueChanged.addHandler({(a) in self.valueStepper.value = self.radialGauge.value self.stepperValueChanged(self) }, forObject: self) @@ -51,7 +54,7 @@ class XGUsingRangesViewController: UIViewController { self.linearGauge.isReadOnly = false self.linearGauge.backgroundColor = UIColor.clearColor() - linearGauge.gaugeValueChanged.addHandler({(sender: NSObject!, args: XuniEventArgs!) -> Void in + linearGauge.gaugeValueChanged.addHandler({(a) in self.valueStepper.value = self.linearGauge.value self.stepperValueChanged(self) }, forObject: self) @@ -122,4 +125,3 @@ class XGUsingRangesViewController: UIViewController { // Copyright © 2016 GrapeCity. All rights reserved. // -import XuniGaugeKit \ No newline at end of file diff --git a/Swift/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings b/Swift/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings index ea141d8..3687668 100644 --- a/Swift/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings +++ b/Swift/Gauges101/Gauges101/ja.lproj/LaunchScreen.strings @@ -1,6 +1,6 @@ /* Class = "UILabel"; text = " Copyright (c) 2015 GrapeCity. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ -"8ie-xW-0ye.text" = " Copyright (c) 2015 GrapeCity. All rights reserved."; +"8ie-xW-0ye.text" = " Copyright (c) 2016 GrapeCity. All rights reserved."; /* Class = "UILabel"; text = "Gauges101"; ObjectID = "kId-c2-rCX"; */ "kId-c2-rCX.text" = "Gauges101"; diff --git a/Swift/Gauges101/Gauges101/ja.lproj/Main.strings b/Swift/Gauges101/Gauges101/ja.lproj/Main.strings index 1ccab45..9dd8bcd 100644 --- a/Swift/Gauges101/Gauges101/ja.lproj/Main.strings +++ b/Swift/Gauges101/Gauges101/ja.lproj/Main.strings @@ -1,18 +1,18 @@ - + /* Class = "UIViewController"; title = "Displaying Values"; ObjectID = "08v-Js-otx"; */ -"08v-Js-otx.title" = "Displaying Values"; +"08v-Js-otx.title" = "値の表示"; /* Class = "UILabel"; text = "Getting Started"; ObjectID = "1ee-Cf-CWG"; */ -"1ee-Cf-CWG.text" = "Getting Started"; +"1ee-Cf-CWG.text" = "Gaugeの基本機能"; /* Class = "UILabel"; text = "Target:"; ObjectID = "3ED-w9-Ppg"; */ -"3ED-w9-Ppg.text" = "Target:"; +"3ED-w9-Ppg.text" = "目標値:"; /* Class = "UILabel"; text = "Using Ranges"; ObjectID = "7J6-GK-aNv"; */ -"7J6-GK-aNv.text" = "Using Ranges"; +"7J6-GK-aNv.text" = "範囲の使用"; /* Class = "UIViewController"; title = "Direction"; ObjectID = "8HJ-fh-1SY"; */ -"8HJ-fh-1SY.title" = "Direction"; +"8HJ-fh-1SY.title" = "ポインタの方向"; /* Class = "UINavigationItem"; title = "Gauges101"; ObjectID = "8Wf-a8-DaP"; */ "8Wf-a8-DaP.title" = "Gauges101"; @@ -21,25 +21,25 @@ "90n-xp-2bQ.text" = ">"; /* Class = "UIViewController"; title = "Using Ranges"; ObjectID = "97A-vA-PeO"; */ -"97A-vA-PeO.title" = "Using Ranges"; +"97A-vA-PeO.title" = "範囲の使用"; /* Class = "UILabel"; text = "Automatic Scaling"; ObjectID = "9Cb-yd-23P"; */ -"9Cb-yd-23P.text" = "Automatic Scaling"; +"9Cb-yd-23P.text" = "自動スケーリング"; /* Class = "UILabel"; text = ">"; ObjectID = "9NI-Dt-7eP"; */ "9NI-Dt-7eP.text" = ">"; /* Class = "UILabel"; text = "BulletGraph"; ObjectID = "9el-8a-fhh"; */ -"9el-8a-fhh.text" = "BulletGraph"; +"9el-8a-fhh.text" = "ブレットグラフ"; /* Class = "UITableViewController"; title = "Gauges101"; ObjectID = "AU1-cr-RgQ"; */ "AU1-cr-RgQ.title" = "Gauges101"; /* Class = "UILabel"; text = "Shows custom animation techniques"; ObjectID = "Alq-na-nFv"; */ -"Alq-na-nFv.text" = "Shows custom animation techniques"; +"Alq-na-nFv.text" = "カスタマイズしたアニメーション効果"; /* Class = "UIBarButtonItem"; title = "Save"; ObjectID = "FBK-za-8GA"; */ -"FBK-za-8GA.title" = "Save"; +"FBK-za-8GA.title" = "保存"; /* Class = "UILabel"; text = "25"; ObjectID = "FxO-w8-ck0"; */ "FxO-w8-ck0.text" = "25"; @@ -51,10 +51,10 @@ "HBI-Dp-7R8.text" = "25"; /* Class = "UIViewController"; title = "Getting Started"; ObjectID = "K37-G5-oNb"; */ -"K37-G5-oNb.title" = "Getting Started"; +"K37-G5-oNb.title" = "Gaugeの基本機能"; /* Class = "UILabel"; text = "Value:"; ObjectID = "L1J-cb-T1O"; */ -"L1J-cb-T1O.text" = "Value:"; +"L1J-cb-T1O.text" = "値:"; /* Class = "UILabel"; text = "25"; ObjectID = "MY9-fZ-afe"; */ "MY9-fZ-afe.text" = "25"; @@ -63,70 +63,70 @@ "OGj-UI-bB3.text" = "25"; /* Class = "UILabel"; text = "Bad:"; ObjectID = "Pub-T4-qcT"; */ -"Pub-T4-qcT.text" = "Bad:"; +"Pub-T4-qcT.text" = "不良値:"; /* Class = "UILabel"; text = "Direction"; ObjectID = "SAF-Yp-pdT"; */ -"SAF-Yp-pdT.text" = "Direction"; +"SAF-Yp-pdT.text" = "ポインタの方向"; /* Class = "UINavigationItem"; title = "Export Image"; ObjectID = "SNe-ez-n5s"; */ -"SNe-ez-n5s.title" = "Export Image"; +"SNe-ez-n5s.title" = "画像のエクスポート"; /* Class = "UIBarButtonItem"; title = "Take"; ObjectID = "SfY-tf-4K4"; */ -"SfY-tf-4K4.title" = "Take"; +"SfY-tf-4K4.title" = "画像を取得"; /* Class = "UILabel"; text = "25"; ObjectID = "V8W-Od-sjy"; */ "V8W-Od-sjy.text" = "25"; /* Class = "UILabel"; text = "Shows a radial gauge with different sweep angles"; ObjectID = "Van-sG-8er"; */ -"Van-sG-8er.text" = "Shows a radial gauge with different sweep angles"; +"Van-sG-8er.text" = "角度が異なる円形ゲージを表示"; /* Class = "UIViewController"; title = "Export Image"; ObjectID = "WDz-EX-ieM"; */ -"WDz-EX-ieM.title" = "Export Image"; +"WDz-EX-ieM.title" = "画像へのエクスポート"; /* Class = "UILabel"; text = "Displaying Values"; ObjectID = "Wge-Jg-8BX"; */ -"Wge-Jg-8BX.text" = "Displaying Values"; +"Wge-Jg-8BX.text" = "値ラベルの表示"; /* Class = "UILabel"; text = "Export Image"; ObjectID = "XMx-92-4cz"; */ -"XMx-92-4cz.text" = "Export Image"; +"XMx-92-4cz.text" = "画像へのエクスポート"; /* Class = "UILabel"; text = "Bullet Graph"; ObjectID = "XNt-pY-JQX"; */ -"XNt-pY-JQX.text" = "Bullet Graph"; +"XNt-pY-JQX.text" = "ブレットグラフ"; /* Class = "UILabel"; text = "Shows how to export an image of a gauge"; ObjectID = "XWe-Ze-WII"; */ -"XWe-Ze-WII.text" = "Shows how to export an image of a gauge"; +"XWe-Ze-WII.text" = "ゲージを画像として表示する方法"; /* Class = "UILabel"; text = "Animation"; ObjectID = "Xl9-rg-7Sy"; */ -"Xl9-rg-7Sy.text" = "Animation"; +"Xl9-rg-7Sy.text" = "アニメーション"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[0] = "Right"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[0]" = "Right"; +"YMs-gj-yEm.segmentTitles[0]" = "右(Right)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[1] = "Left"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[1]" = "Left"; +"YMs-gj-yEm.segmentTitles[1]" = "左(Left)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[2] = "Down"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[2]" = "Down"; +"YMs-gj-yEm.segmentTitles[2]" = "下(Down)"; /* Class = "UISegmentedControl"; YMs-gj-yEm.segmentTitles[3] = "Up"; ObjectID = "YMs-gj-yEm"; */ -"YMs-gj-yEm.segmentTitles[3]" = "Up"; +"YMs-gj-yEm.segmentTitles[3]" = "上(Up)"; /* Class = "UILabel"; text = "Radial Gauge:"; ObjectID = "aG3-kp-5yy"; */ -"aG3-kp-5yy.text" = "Radial Gauge:"; +"aG3-kp-5yy.text" = "円形ゲージ"; /* Class = "UILabel"; text = ">"; ObjectID = "bGa-Ca-sVM"; */ "bGa-Ca-sVM.text" = ">"; /* Class = "UILabel"; text = "Linear Gauge"; ObjectID = "bSF-Vv-iOI"; */ -"bSF-Vv-iOI.text" = "Linear Gauge"; +"bSF-Vv-iOI.text" = "線形ゲージ"; /* Class = "UILabel"; text = "Direction:"; ObjectID = "dkS-jp-MbA"; */ -"dkS-jp-MbA.text" = "Direction:"; +"dkS-jp-MbA.text" = "方向:"; /* Class = "UILabel"; text = "Shows customized ranges behind the pointer"; ObjectID = "eFO-oh-g7u"; */ -"eFO-oh-g7u.text" = "Shows customized ranges behind the pointer"; +"eFO-oh-g7u.text" = "範囲の設定領域をポインタの背後に表示"; /* Class = "UILabel"; text = "Good:"; ObjectID = "fKb-LG-Ipi"; */ -"fKb-LG-Ipi.text" = "Good:"; +"fKb-LG-Ipi.text" = "良 値:"; /* Class = "UILabel"; text = "25"; ObjectID = "fXK-Pj-z2I"; */ "fXK-Pj-z2I.text" = "25"; @@ -135,7 +135,7 @@ "gM7-nb-edl.text" = "25"; /* Class = "UILabel"; text = "Shows a bulletgraph with good, bad and target ranges"; ObjectID = "i1t-bi-tIj"; */ -"i1t-bi-tIj.text" = "Shows a bulletgraph with good, bad and target ranges"; +"i1t-bi-tIj.text" = "「良値/不良値/目標値」の範囲を設定して表示"; /* Class = "UILabel"; text = ">"; ObjectID = "ip3-22-hTU"; */ "ip3-22-hTU.text" = ">"; @@ -144,40 +144,40 @@ "jKi-Lt-4No.title" = "Gauges101"; /* Class = "UILabel"; text = "Show ranges:"; ObjectID = "kWE-Ws-VUg"; */ -"kWE-Ws-VUg.text" = "Show ranges:"; +"kWE-Ws-VUg.text" = "範囲の表示:"; /* Class = "UIViewController"; title = "Automatic Scaling"; ObjectID = "lsw-OR-pPQ"; */ -"lsw-OR-pPQ.title" = "Automatic Scaling"; +"lsw-OR-pPQ.title" = "自動スケーリング"; /* Class = "UILabel"; text = "Sweep Angle:"; ObjectID = "ox7-O5-nN1"; */ -"ox7-O5-nN1.text" = "Sweep Angle:"; +"ox7-O5-nN1.text" = "移動角度:"; /* Class = "UILabel"; text = "Shows linear gauges at different directions"; ObjectID = "qT9-gI-3dF"; */ -"qT9-gI-3dF.text" = "Shows linear gauges at different directions"; +"qT9-gI-3dF.text" = "方向が異なる線形ゲージを表示"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[0] = "All"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[0]" = "All"; +"qsf-cb-II0.segmentTitles[0]" = "すべて表示"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[1] = "MinMax"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[1]" = "MinMax"; +"qsf-cb-II0.segmentTitles[1]" = "最小値と最大値"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[2] = "Value"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[2]" = "Value"; +"qsf-cb-II0.segmentTitles[2]" = "現在の値"; /* Class = "UISegmentedControl"; qsf-cb-II0.segmentTitles[3] = "None"; ObjectID = "qsf-cb-II0"; */ -"qsf-cb-II0.segmentTitles[3]" = "None"; +"qsf-cb-II0.segmentTitles[3]" = "表示なし"; /* Class = "UIViewController"; title = "BulletGraph"; ObjectID = "qxu-TE-WXN"; */ -"qxu-TE-WXN.title" = "BulletGraph"; +"qxu-TE-WXN.title" = "ブレットグラフ"; /* Class = "UILabel"; text = ">"; ObjectID = "rSe-fm-Gxe"; */ "rSe-fm-Gxe.text" = ">"; /* Class = "UILabel"; text = "Value:"; ObjectID = "rZc-UW-ghl"; */ -"rZc-UW-ghl.text" = "Value:"; +"rZc-UW-ghl.text" = "現在の値:"; /* Class = "UILabel"; text = "Start Angle:"; ObjectID = "t1k-Of-tJc"; */ -"t1k-Of-tJc.text" = "Start Angle:"; +"t1k-Of-tJc.text" = "開始角度:"; /* Class = "UILabel"; text = ">"; ObjectID = "uWs-YC-BOy"; */ "uWs-YC-BOy.text" = ">"; @@ -186,16 +186,16 @@ "v4P-ZC-9ef.text" = ">"; /* Class = "UIViewController"; title = "Animation"; ObjectID = "yDK-XO-7Ae"; */ -"yDK-XO-7Ae.title" = "Animation"; +"yDK-XO-7Ae.title" = "アニメーション"; /* Class = "UILabel"; text = "Shows simple gauge controls with interaction"; ObjectID = "yEl-vp-kjt"; */ -"yEl-vp-kjt.text" = "Shows simple gauge controls with interaction"; +"yEl-vp-kjt.text" = "インタラクション機能を持つゲージ"; /* Class = "UILabel"; text = "Shows value labels on the gauges"; ObjectID = "yWQ-mg-ImF"; */ -"yWQ-mg-ImF.text" = "Shows value labels on the gauges"; +"yWQ-mg-ImF.text" = "値ラベルをゲージに表示"; /* Class = "UILabel"; text = "Value:"; ObjectID = "z2t-xN-ZFN"; */ -"z2t-xN-ZFN.text" = "Value:"; +"z2t-xN-ZFN.text" = "現在の値:"; /* Class = "UILabel"; text = ">"; ObjectID = "zUw-ej-Vj6"; */ "zUw-ej-Vj6.text" = ">"; diff --git a/Swift/Input101/Input101.xcodeproj/project.pbxproj b/Swift/Input101/Input101.xcodeproj/project.pbxproj new file mode 100644 index 0000000..052b2ad --- /dev/null +++ b/Swift/Input101/Input101.xcodeproj/project.pbxproj @@ -0,0 +1,360 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 844FD0E11CEDA7090011DEA1 /* ComboBoxController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844FD0E01CEDA7090011DEA1 /* ComboBoxController.swift */; }; + 84837AD31CE3230B0008468B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84837AD21CE3230B0008468B /* AppDelegate.swift */; }; + 84837AD81CE3230B0008468B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84837AD61CE3230B0008468B /* Main.storyboard */; }; + 84837ADA1CE3230B0008468B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84837AD91CE3230B0008468B /* Assets.xcassets */; }; + 84837ADD1CE3230B0008468B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84837ADB1CE3230B0008468B /* LaunchScreen.storyboard */; }; + 84837AE61CE32AAC0008468B /* XuniCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84837AE41CE32AAC0008468B /* XuniCoreKit.framework */; }; + 84837AE71CE32AAC0008468B /* XuniInputKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84837AE51CE32AAC0008468B /* XuniInputKit.framework */; }; + 84837AEF1CE32D7E0008468B /* MaskedInputController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84837AEE1CE32D7E0008468B /* MaskedInputController.swift */; }; + 84837B051CE576820008468B /* License.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84837B041CE576820008468B /* License.swift */; }; + 84BD21891D13E55600CCE1BF /* input_autocomplete.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD21851D13E55600CCE1BF /* input_autocomplete.png */; }; + 84BD218A1D13E55600CCE1BF /* input_combobox.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD21861D13E55600CCE1BF /* input_combobox.png */; }; + 84BD218B1D13E55600CCE1BF /* input_dropdown.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD21871D13E55600CCE1BF /* input_dropdown.png */; }; + 84BD218C1D13E55600CCE1BF /* input_mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 84BD21881D13E55600CCE1BF /* input_mask.png */; }; + ED7284F01CE99616006768D6 /* XuniCalendarKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED7284EF1CE99616006768D6 /* XuniCalendarKit.framework */; }; + ED7284F21CE99625006768D6 /* DropDownController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7284F11CE99625006768D6 /* DropDownController.swift */; }; + ED7983031D05665E00EC9013 /* AutoCompleteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7983011D05665E00EC9013 /* AutoCompleteController.swift */; }; + ED7983041D05665E00EC9013 /* AutoCompleteData.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7983021D05665E00EC9013 /* AutoCompleteData.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 844FD0E01CEDA7090011DEA1 /* ComboBoxController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ComboBoxController.swift; path = Samples/ComboBoxController.swift; sourceTree = ""; }; + 84837ACF1CE3230B0008468B /* Input101.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Input101.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84837AD21CE3230B0008468B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 84837AD71CE3230B0008468B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 84837AD91CE3230B0008468B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 84837ADC1CE3230B0008468B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 84837ADE1CE3230B0008468B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 84837AE41CE32AAC0008468B /* XuniCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCoreKit.framework; path = ../../../Controls/XuniCoreKit.framework; sourceTree = ""; }; + 84837AE51CE32AAC0008468B /* XuniInputKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniInputKit.framework; path = ../../../Controls/XuniInputKit.framework; sourceTree = ""; }; + 84837AEE1CE32D7E0008468B /* MaskedInputController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MaskedInputController.swift; path = Samples/MaskedInputController.swift; sourceTree = ""; }; + 84837B041CE576820008468B /* License.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = License.swift; sourceTree = ""; }; + 84BD21851D13E55600CCE1BF /* input_autocomplete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_autocomplete.png; path = Images/input_autocomplete.png; sourceTree = ""; }; + 84BD21861D13E55600CCE1BF /* input_combobox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_combobox.png; path = Images/input_combobox.png; sourceTree = ""; }; + 84BD21871D13E55600CCE1BF /* input_dropdown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_dropdown.png; path = Images/input_dropdown.png; sourceTree = ""; }; + 84BD21881D13E55600CCE1BF /* input_mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = input_mask.png; path = Images/input_mask.png; sourceTree = ""; }; + ED7284EF1CE99616006768D6 /* XuniCalendarKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XuniCalendarKit.framework; path = ../../../Controls/XuniCalendarKit.framework; sourceTree = ""; }; + ED7284F11CE99625006768D6 /* DropDownController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DropDownController.swift; path = Samples/DropDownController.swift; sourceTree = ""; }; + ED7983011D05665E00EC9013 /* AutoCompleteController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AutoCompleteController.swift; path = Samples/AutoCompleteController.swift; sourceTree = ""; }; + ED7983021D05665E00EC9013 /* AutoCompleteData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AutoCompleteData.swift; path = Samples/AutoCompleteData.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84837ACC1CE3230B0008468B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ED7284F01CE99616006768D6 /* XuniCalendarKit.framework in Frameworks */, + 84837AE61CE32AAC0008468B /* XuniCoreKit.framework in Frameworks */, + 84837AE71CE32AAC0008468B /* XuniInputKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84837AC61CE3230B0008468B = { + isa = PBXGroup; + children = ( + ED7284EF1CE99616006768D6 /* XuniCalendarKit.framework */, + 84837AE41CE32AAC0008468B /* XuniCoreKit.framework */, + 84837AE51CE32AAC0008468B /* XuniInputKit.framework */, + 84837AD11CE3230B0008468B /* Input101 */, + 84837AD01CE3230B0008468B /* Products */, + ); + sourceTree = ""; + }; + 84837AD01CE3230B0008468B /* Products */ = { + isa = PBXGroup; + children = ( + 84837ACF1CE3230B0008468B /* Input101.app */, + ); + name = Products; + sourceTree = ""; + }; + 84837AD11CE3230B0008468B /* Input101 */ = { + isa = PBXGroup; + children = ( + 84837AD21CE3230B0008468B /* AppDelegate.swift */, + 84837AD91CE3230B0008468B /* Assets.xcassets */, + 84837AE81CE32B410008468B /* Images */, + 84837ADE1CE3230B0008468B /* Info.plist */, + 84837ADB1CE3230B0008468B /* LaunchScreen.storyboard */, + 84837B041CE576820008468B /* License.swift */, + 84837AD61CE3230B0008468B /* Main.storyboard */, + 84837AE91CE32B4B0008468B /* Samples */, + ); + path = Input101; + sourceTree = ""; + }; + 84837AE81CE32B410008468B /* Images */ = { + isa = PBXGroup; + children = ( + 84BD21851D13E55600CCE1BF /* input_autocomplete.png */, + 84BD21861D13E55600CCE1BF /* input_combobox.png */, + 84BD21871D13E55600CCE1BF /* input_dropdown.png */, + 84BD21881D13E55600CCE1BF /* input_mask.png */, + ); + name = Images; + sourceTree = ""; + }; + 84837AE91CE32B4B0008468B /* Samples */ = { + isa = PBXGroup; + children = ( + ED7983011D05665E00EC9013 /* AutoCompleteController.swift */, + ED7983021D05665E00EC9013 /* AutoCompleteData.swift */, + 844FD0E01CEDA7090011DEA1 /* ComboBoxController.swift */, + ED7284F11CE99625006768D6 /* DropDownController.swift */, + 84837AEE1CE32D7E0008468B /* MaskedInputController.swift */, + ); + name = Samples; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84837ACE1CE3230B0008468B /* Input101 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84837AE11CE3230B0008468B /* Build configuration list for PBXNativeTarget "Input101" */; + buildPhases = ( + 84837ACB1CE3230B0008468B /* Sources */, + 84837ACC1CE3230B0008468B /* Frameworks */, + 84837ACD1CE3230B0008468B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Input101; + productName = Input101; + productReference = 84837ACF1CE3230B0008468B /* Input101.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84837AC71CE3230B0008468B /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = ComponentOne; + TargetAttributes = { + 84837ACE1CE3230B0008468B = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 84837ACA1CE3230B0008468B /* Build configuration list for PBXProject "Input101" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 84837AC61CE3230B0008468B; + productRefGroup = 84837AD01CE3230B0008468B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84837ACE1CE3230B0008468B /* Input101 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84837ACD1CE3230B0008468B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84BD21891D13E55600CCE1BF /* input_autocomplete.png in Resources */, + 84837ADD1CE3230B0008468B /* LaunchScreen.storyboard in Resources */, + 84BD218B1D13E55600CCE1BF /* input_dropdown.png in Resources */, + 84837ADA1CE3230B0008468B /* Assets.xcassets in Resources */, + 84BD218C1D13E55600CCE1BF /* input_mask.png in Resources */, + 84BD218A1D13E55600CCE1BF /* input_combobox.png in Resources */, + 84837AD81CE3230B0008468B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84837ACB1CE3230B0008468B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ED7284F21CE99625006768D6 /* DropDownController.swift in Sources */, + ED7983031D05665E00EC9013 /* AutoCompleteController.swift in Sources */, + 84837AD31CE3230B0008468B /* AppDelegate.swift in Sources */, + 844FD0E11CEDA7090011DEA1 /* ComboBoxController.swift in Sources */, + 84837AEF1CE32D7E0008468B /* MaskedInputController.swift in Sources */, + 84837B051CE576820008468B /* License.swift in Sources */, + ED7983041D05665E00EC9013 /* AutoCompleteData.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84837AD61CE3230B0008468B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84837AD71CE3230B0008468B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 84837ADB1CE3230B0008468B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 84837ADC1CE3230B0008468B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84837ADF1CE3230B0008468B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 84837AE01CE3230B0008468B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 84837AE21CE3230B0008468B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; + INFOPLIST_FILE = Input101/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = GrapeCity.Input101; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 84837AE31CE3230B0008468B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ../../../Controls; + INFOPLIST_FILE = Input101/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = GrapeCity.Input101; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84837ACA1CE3230B0008468B /* Build configuration list for PBXProject "Input101" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84837ADF1CE3230B0008468B /* Debug */, + 84837AE01CE3230B0008468B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84837AE11CE3230B0008468B /* Build configuration list for PBXNativeTarget "Input101" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84837AE21CE3230B0008468B /* Debug */, + 84837AE31CE3230B0008468B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84837AC71CE3230B0008468B /* Project object */; +} diff --git a/Swift/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Swift/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1fd20e1 --- /dev/null +++ b/Swift/Input101/Input101.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Swift/Input101/Input101/AppDelegate.swift b/Swift/Input101/Input101/AppDelegate.swift new file mode 100644 index 0000000..e8fd905 --- /dev/null +++ b/Swift/Input101/Input101/AppDelegate.swift @@ -0,0 +1,47 @@ +// +// AppDelegate.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import UIKit +import XuniCoreKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + XuniLicenseManager.setKey(License().key) + return true + } + + func applicationWillResignActive(application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..c4071ec --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,81 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-Small-40@2x-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x-1-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000..6092bc7 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..d468678 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000..2f7ac47 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png new file mode 100644 index 0000000..abee98b Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png new file mode 100644 index 0000000..5acb4d9 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1-1.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png new file mode 100644 index 0000000..96950d0 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json new file mode 100644 index 0000000..8042295 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "australia.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/australia.png b/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/australia.png new file mode 100644 index 0000000..8937404 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Australia.imageset/australia.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json new file mode 100644 index 0000000..4424209 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "bangladesh.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png b/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png new file mode 100644 index 0000000..8ef2443 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Bangladesh.imageset/bangladesh.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png b/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png new file mode 100644 index 0000000..47a007f Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Brazil.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json new file mode 100644 index 0000000..d75e135 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Brazil.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Brazil.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png b/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png new file mode 100644 index 0000000..bfff414 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Canada.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json new file mode 100644 index 0000000..ca05415 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Canada.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Canada.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/China.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/China.imageset/Contents.json new file mode 100644 index 0000000..b677330 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/China.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "china.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/China.imageset/china.png b/Swift/Input101/Input101/Assets.xcassets/China.imageset/china.png new file mode 100644 index 0000000..d0da550 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/China.imageset/china.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/France.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/France.imageset/Contents.json new file mode 100644 index 0000000..d011da7 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/France.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "France.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/France.imageset/France.png b/Swift/Input101/Input101/Assets.xcassets/France.imageset/France.png new file mode 100644 index 0000000..12318d4 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/France.imageset/France.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json new file mode 100644 index 0000000..c06bb39 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Germany.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png b/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png new file mode 100644 index 0000000..77e9338 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Germany.imageset/Germany.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/India.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/India.imageset/Contents.json new file mode 100644 index 0000000..6922a57 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/India.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "india.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/India.imageset/india.png b/Swift/Input101/Input101/Assets.xcassets/India.imageset/india.png new file mode 100644 index 0000000..e0a8865 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/India.imageset/india.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json new file mode 100644 index 0000000..0d7f5d1 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "japan.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png b/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png new file mode 100644 index 0000000..29c45d5 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Japan.imageset/japan.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json new file mode 100644 index 0000000..19dcbf3 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "nepal.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png b/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png new file mode 100644 index 0000000..f011adc Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Nepal.imageset/nepal.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json new file mode 100644 index 0000000..6a0cbfe --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "pakistan.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png b/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png new file mode 100644 index 0000000..1630f55 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Pakistan.imageset/pakistan.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json new file mode 100644 index 0000000..a17c190 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "srilanka.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png b/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png new file mode 100644 index 0000000..2a7d925 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/Srilanka.imageset/srilanka.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json new file mode 100644 index 0000000..a863b15 --- /dev/null +++ b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "tip.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "tip@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "tip@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip.png b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip.png new file mode 100644 index 0000000..622b0b2 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png new file mode 100644 index 0000000..18facde Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@2x.png differ diff --git a/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png new file mode 100644 index 0000000..9a343d2 Binary files /dev/null and b/Swift/Input101/Input101/Assets.xcassets/tip.imageset/tip@3x.png differ diff --git a/Swift/Input101/Input101/Base.lproj/LaunchScreen.storyboard b/Swift/Input101/Input101/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..163bcbc --- /dev/null +++ b/Swift/Input101/Input101/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Swift/Input101/Input101/Base.lproj/Main.storyboard b/Swift/Input101/Input101/Base.lproj/Main.storyboard new file mode 100644 index 0000000..5784c7f --- /dev/null +++ b/Swift/Input101/Input101/Base.lproj/Main.storyboard @@ -0,0 +1,494 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Swift/Input101/Input101/Images/input_autocomplete.png b/Swift/Input101/Input101/Images/input_autocomplete.png new file mode 100644 index 0000000..1a3342f Binary files /dev/null and b/Swift/Input101/Input101/Images/input_autocomplete.png differ diff --git a/Swift/Input101/Input101/Images/input_combobox.png b/Swift/Input101/Input101/Images/input_combobox.png new file mode 100644 index 0000000..03057f7 Binary files /dev/null and b/Swift/Input101/Input101/Images/input_combobox.png differ diff --git a/Swift/Input101/Input101/Images/input_dropdown.png b/Swift/Input101/Input101/Images/input_dropdown.png new file mode 100644 index 0000000..a1b491e Binary files /dev/null and b/Swift/Input101/Input101/Images/input_dropdown.png differ diff --git a/Swift/Input101/Input101/Images/input_mask.png b/Swift/Input101/Input101/Images/input_mask.png new file mode 100644 index 0000000..a88a992 Binary files /dev/null and b/Swift/Input101/Input101/Images/input_mask.png differ diff --git a/Swift/Input101/Input101/Info.plist b/Swift/Input101/Input101/Info.plist new file mode 100644 index 0000000..9a91652 --- /dev/null +++ b/Swift/Input101/Input101/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + GrapeCity.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Swift/Input101/Input101/License.swift b/Swift/Input101/Input101/License.swift new file mode 100644 index 0000000..3aeebe8 --- /dev/null +++ b/Swift/Input101/Input101/License.swift @@ -0,0 +1,13 @@ +// +// License.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import Foundation + +public class License{ + let key = "ABgBGAIYB4BJAG4AcAB1AHQAMQAwADEAEM5e/j4SMW2WhbOdrPn9/iL6gIlWw9hypAk4iAn6Sm5uA7PTpgi01B7EntbZzt4nkSi8oAwO0XSM6xPla8s1Er8w77Ffpca/DWHFHWakD45bUlZ5sGqNN1ASViKG3/1FoyJA517oIWb4K2bFtgvoBYPYG3Wl/+Jo+INuMmfQf9WT03EsRxEUD53AJ1cVACRnDq3akHJEPSnljj1/0jqM4JLKnfLQIhXLmYkjn1Z54BrT46NTPfQBBAmVHj0TPd7N/+axZBuDHEIFcpP9m4HnOKbl/ltghsEr19zmdBs2XVa57NR/Omqng18GasvevcZcVZixSbEunTu9prnDlyc+EAu8mdKxy7K9PnsuwWAlS9pTGTL6u+If/OXGgZfFj52Btrc1r0yiz5z5e2O92mCsbNpWQJCYHy8kluMSIkSIpDiPb45WRKoeslvolGOaKa00Ft6RdddqW66RyoKc9DrxiBowPuPwG1EbJIEXtrk4b6jW0Q9d2KOjxMikKPg28sO2Ti56G4DxqtSJbJYD6o2wz/EtjHAYJA1AUJVafXMkcdCxytQ5XpElKF68CyOGHeONanc9qxo9YheROEzaQ2leAXhoiMbH93F4E6F/yovgLJCvN2cRCTswDdVmGkHXwoxaKOXgCW45ZUtTDCVbTBCUj7ALtE8AR629qFpfOnrarbgwggVkMIIETKADAgECAhAiELIXSwsSf7soBS4RsyUKMA0GCSqGSIb3DQEBBQUAMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2lnbiBDbGFzcyAzIENvZGUgU2lnbmluZyAyMDEwIENBMB4XDTEzMDkyNDAwMDAwMFoXDTE2MTAyMzIzNTk1OVowgacxCzAJBgNVBAYTAlVTMRUwEwYDVQQIEwxQZW5uc3lsdmFuaWExEzARBgNVBAcTClBpdHRzYnVyZ2gxFTATBgNVBAoUDENvbXBvbmVudE9uZTE+MDwGA1UECxM1RGlnaXRhbCBJRCBDbGFzcyAzIC0gTWljcm9zb2Z0IFNvZnR3YXJlIFZhbGlkYXRpb24gdjIxFTATBgNVBAMUDENvbXBvbmVudE9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALnLoJqpSVVqnJLza05lTIcakcvyl7dxBxZ+cwk4Cqk6+UaC6f5Z5LvRD1+AhiARulIgI7vPgkCf+c83iOViQWyJuXFJMnGava3AZ6X/o0DaUqzYzFOWz/MrAzOJvYMtrj/NT9m8BWei+UkY1NWUytiSa0JINYt55i/FztxXtP7K27Lj3ZYwwUkNLOKJ4f+qkR0QSnygYUQQyMDOLg5vfYkDLdUQkNretBT2JZ6x6dkNcCpif5dbZ01MOFEEjZJlGdnvrenuOYfw5CNloDSCRzttSJ89JtJOjQxyrBQf1ylOXoiXCPpzAXCU2SF/dYXSimVM8pT0NZ7pUNG1H+Az2nMCAwEAAaOCAXswggF3MAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgeAMEAGA1UdHwQ5MDcwNaAzoDGGL2h0dHA6Ly9jc2MzLTIwMTAtY3JsLnZlcmlzaWduLmNvbS9DU0MzLTIwMTAuY3JsMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwMwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYTATBgNVHSUEDDAKBggrBgEFBQcDAzBxBggrBgEFBQcBAQRlMGMwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA7BggrBgEFBQcwAoYvaHR0cDovL2NzYzMtMjAxMC1haWEudmVyaXNpZ24uY29tL0NTQzMtMjAxMC5jZXIwHwYDVR0jBBgwFoAUz5mp6nsm9EvJjo/X8AUm7+PSp50wEQYJYIZIAYb4QgEBBAQDAgQQMBYGCisGAQQBgjcCARsECDAGAQEAAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBhzVY5zjwYAFjmIa2JSWbqeXQ1jrf2o5DoRYWgI/+4LEpJ+U2o+VAI5kIYSNGp5Yjq7XvQosjs/C6qdwpfTd3bh2lEER4XCRzpo+4HK9Wxwj0D8P1UoUn43LjlbMB/GzRRhNq0BN+ETlD0+BejspoUssd5GRhGLNOXmtDV+9/a7j7h9t5JEMk++JblysVe6UpcgtoY9XguZLsm5DOhQT0QIlgOIK1QSl/whiKGdPBfD5jN4/SHsGVUbPpC+Pxjh5yT/LSm9+Nqk+tzMQQcpbTfeLKs9kLgsG4Uo9fsg5wOl4FN4CBHo2CLXEqtriy3//rpUMOutVKmm1awHhgGqsuFMIICuDCCAaCgAwIBAgIIDz3opNHfYG8wDQYJKoZIhvcNAQEFBQAwHDEaMBgGA1UEAwwRR0MtU1UxMTUwMC02NjY2NjYwHhcNMTUwMTAxMDAwMDAwWhcNMTgwNDMwMDAwMDAwWjAcMRowGAYDVQQDDBFHQy1TVTExNTAwLTY2NjY2NjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALGow9bwScG7KAtAWVydZUApG0MrMJNuWpf0T87RbtiAbbHSlNgbma3izL4PQqRR9yCRdwJDtQ5UxuGfF0/IrerZDAzopnYHZSpuJT9p72VAX/M6eHJPb4vINT6hsc3WMPHRwroBLK3Ul82xedlnoDTBz/PWmezsr9NI/zGwo4/n6b0Z/5KY8LTqP2IYSwJN4CiGQ7etJ18KKpTfEAs5r9BwJBy565yZEizvyrL/u5k+1yS19DgkaG5p43TLkUNNK+fJjeUpI2yMoWcwT3ztkkSU8VFMia3ORRg9tu86p1D1ck5dW2oWDbqrik1cm06CIrcfCXwYeX5VpnshwkGm9GECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAo2/0yiTPGERQMjgf7wRUO21nP7qFnptAaznXQUINgUYhnFTlvRQ8PN1sI1a027XTCFuCi2kgB8FjDHMtNAWD10ZCJDGhfOnbBbld0VNSQvQDtG3ORrTaNKnpWt4FxZWS6IgYmOXMK97UyWMMd3MedVwRtuzksrZ/pgh8GHi+I7cA9aIDLiroobmt0X+XyLuwskdbfMxFePUDpAdM7hsfnZ+VZJTs6ed4Irad3BLrqMu+9MPTaqR38M3aK6OpMAD5IydH9O0G2HaEeZUSxyDCqw+LcY4uZh+B4dyQ/itkAxfkRXKzoJDXBY4+PYhO2+xm1NPaj+2DC4PlMo3HdySCPQ==" + +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Samples/AutoCompleteController.swift b/Swift/Input101/Input101/Samples/AutoCompleteController.swift new file mode 100644 index 0000000..2808f26 --- /dev/null +++ b/Swift/Input101/Input101/Samples/AutoCompleteController.swift @@ -0,0 +1,128 @@ +// +// AutoCompleteController.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import UIKit +import Foundation +import XuniInputKit + +class AutoCompleteController: UIViewController, XuniDropDownDelegate, XuniAutoCompleteDelegate,UITableViewDelegate,UITableViewDataSource{ + + @IBOutlet weak var highlightDropdown: XuniAutoComplete! + @IBOutlet weak var delayDropdown: XuniAutoComplete! + @IBOutlet weak var customDropdown: XuniAutoComplete! + @IBOutlet weak var filterDropdown: XuniAutoComplete! + + override func viewDidLoad() { + super.viewDidLoad() + + //Do any additional setup after loading the view. + highlightDropdown.dropDownHeight = 200; + highlightDropdown.displayMemberPath = "name" + highlightDropdown.isAnimated = true + highlightDropdown.itemsSource = AutoCompleteData.demoData() + highlightDropdown.showButton = false + + delayDropdown.dropDownHeight = 200; + delayDropdown.displayMemberPath = "name"; + delayDropdown.isAnimated = true + delayDropdown.itemsSource = AutoCompleteData.demoData() + delayDropdown.delay = 1000; + delayDropdown.showButton = false + + customDropdown.tableView.delegate = self; + customDropdown.tableView.dataSource = self; + customDropdown.dropDownHeight = 200; + customDropdown.displayMemberPath = "name"; + customDropdown.isAnimated = true + customDropdown.highlightedColor = UIColor.redColor() + customDropdown.itemsSource = AutoCompleteData.demoData() + + filterDropdown.dropDownHeight = 200 + filterDropdown.displayMemberPath = "name" + filterDropdown.isAnimated = true + filterDropdown.delegate = self + filterDropdown.itemsSource = AutoCompleteData.demoData() + filterDropdown.filteringArgs.cancel = true + } + + func filtering(sender: XuniAutoComplete!, eventArgs: XuniAutoCompleteFilteringEventArgs!) { + sender.collectionView.filter = {(item : NSObject?) -> Bool in + let data = item as! AutoCompleteData + let string = data.name as NSString; + if (string.substringToIndex(1).lowercaseString == "b") { + return true; + } + return false; + } as IXuniPredicate + sender.itemsSource = NSMutableArray(array: sender.collectionView.items) +// sender.filteringArgs.cancel = false + + } + + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return customDropdown.temporaryItemSource.count + } + + func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { + return 50; + } + + func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + + var cell = tableView.dequeueReusableCellWithIdentifier("simpleIdentifier") + + if (cell == nil){ + cell = UITableViewCell.init(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "simpleIdentifier") + } + + let selectedBackgroundView = UIView.init() + selectedBackgroundView.backgroundColor = UIColor.init(colorLiteralRed: 0 / 255.0, green: 122 / 255.0, blue: 255 / 255.0, alpha: 1.0) + cell!.selectedBackgroundView = selectedBackgroundView + + let array = ((cell?.contentView.subviews)! as NSArray) + for view in array + { + let v = view as! UIView + v.removeFromSuperview() + } + + let rect = cell!.contentView.frame; + let tempArray = customDropdown.temporaryItemSource as NSArray + let data = tempArray.objectAtIndex(indexPath.row) as! AutoCompleteData + + let image = UIImageView.init(image: UIImage.init(named: data.imageString)) + image.frame = CGRect(x: 8, y: 0, width: 48, height: 48) + cell?.contentView.addSubview(image) + + let label1 = UILabel.init(frame: CGRectMake(65, 10, rect.size.width - 40, rect.size.height / 2)) + label1.text = data.name + cell?.contentView.addSubview(label1) + + customDropdown.normalizeCellText(label1, withSubstring: label1.text) + if((customDropdown.filterString) != nil) + { + customDropdown.highlightedSubstring(customDropdown.filterString, inFilterCellText: label1) + } + + return cell! + } + + func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + customDropdown.selectedIndex = UInt.init(bitPattern: indexPath.row) + customDropdown.isDropDownOpen = false + } + + func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { + cell.separatorInset = UIEdgeInsetsZero + + // Prevent the cell from inheriting the Table View's margin settings. + cell.preservesSuperviewLayoutMargins = false + + // Explictly set cell's layout margins. + cell.layoutMargins = UIEdgeInsetsZero + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Samples/AutoCompleteData.swift b/Swift/Input101/Input101/Samples/AutoCompleteData.swift new file mode 100644 index 0000000..9cdccae --- /dev/null +++ b/Swift/Input101/Input101/Samples/AutoCompleteData.swift @@ -0,0 +1,32 @@ +// +// AutoCompleteData.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import Foundation + +class AutoCompleteData: NSObject { + var name: String + var imageString: String + + init(name: String, imageString: String) { + self.name = name + self.imageString = imageString + } + + class func demoData() -> NSMutableArray { + + let dataArray = NSMutableArray() + let array = ["Australia","Bangladesh","Brazil","Canada", "China", "France","Germany","India", "Japan", "Nepal", "Pakistan", "Srilanka"] + let imageArray = ["Australia","Bangladesh","Brazil","Canada", "China", "France","Germany","India", "Japan", "Nepal", "Pakistan", "Srilanka"] + + for var i = 0; i < array.count; i++ { + let data = AutoCompleteData(name: array[i],imageString: imageArray[i]) + dataArray.addObject(data) + } + + return dataArray; + } +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Samples/ComboBoxController.swift b/Swift/Input101/Input101/Samples/ComboBoxController.swift new file mode 100644 index 0000000..ed7c0f3 --- /dev/null +++ b/Swift/Input101/Input101/Samples/ComboBoxController.swift @@ -0,0 +1,50 @@ +// +// ComboBoxController.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import UIKit +import XuniInputKit + +class ComboBoxController: UIViewController, XuniDropDownDelegate, XuniComboBoxDelegate { + + @IBOutlet weak var comboBoxEdit: XuniComboBox! + @IBOutlet weak var comboBoxNonEdit: XuniComboBox! + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + self.comboBoxEdit.delegate = self + self.comboBoxEdit.displayMemberPath = "name" + self.comboBoxEdit.itemsSource = AutoCompleteData.demoData() + self.comboBoxEdit.dropDownHeight = 200 + self.comboBoxEdit.placeholder = "Please Enter..." + + self.comboBoxNonEdit.delegate = self + self.comboBoxNonEdit.displayMemberPath = "name" + self.comboBoxNonEdit.itemsSource = AutoCompleteData.demoData() + self.comboBoxNonEdit.isEditable = false + self.comboBoxNonEdit.dropDownBehavior = XuniDropDownBehavior.HeaderTap + self.comboBoxNonEdit.dropDownHeight = 200 + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Samples/DropDownController.swift b/Swift/Input101/Input101/Samples/DropDownController.swift new file mode 100644 index 0000000..8f647a8 --- /dev/null +++ b/Swift/Input101/Input101/Samples/DropDownController.swift @@ -0,0 +1,56 @@ +// +// DropDownController.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import Foundation +import XuniInputKit +import XuniCalendarKit + +class DropDownController: UIViewController,XuniDropDownDelegate,XuniCalendarDelegate { + @IBOutlet weak var dropdown: XuniDropDown! + + var _field: XuniMaskedTextField? + var _dropdownView: XuniDropDownView? + var _calendar: XuniCalendar? + + + override func viewDidLoad() { + super.viewDidLoad() + self.title = "DropDown" + + dropdown.delegate = self + dropdown.buttonColor = UIColor.lightGrayColor() + dropdown.dropDownHeight = 300 + dropdown.dropDownWidth = (Double)(dropdown.frame.size.width + 30.0) + dropdown.dropDownDirection = XuniDropDownDirection.BelowOrAbove + dropdown.isAnimated = true + + _field = XuniMaskedTextField.init() + _field!.mask = "00/00/0000" + _field!.borderStyle = UITextBorderStyle.None + dropdown.header = _field + + _calendar = XuniCalendar.init() + _calendar?.disabledTextColor = UIColor.yellowColor() + _calendar?.delegate = self + dropdown.dropDownView = _calendar + } + + + func selectionChanged(sender:XuniCalendar,selectedDates:XuniCalendarRange) + { + let _dateFormatter = NSDateFormatter() + _dateFormatter.dateFormat = "MM/dd/yyyy" + _field!.text = _dateFormatter.stringFromDate((sender).selectedDate) + dropdown.isDropDownOpen = false + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} \ No newline at end of file diff --git a/Swift/Input101/Input101/Samples/MaskedInputController.swift b/Swift/Input101/Input101/Samples/MaskedInputController.swift new file mode 100644 index 0000000..9079a56 --- /dev/null +++ b/Swift/Input101/Input101/Samples/MaskedInputController.swift @@ -0,0 +1,33 @@ +// +// MaskedInputController.swift +// Input101 +// +// Copyright (c) GrapeCity, Inc. All rights reserved. +// + +import Foundation +import XuniInputKit + +class MaskedInputController: UIViewController { + + @IBOutlet weak var maskedID: XuniMaskedTextField! + @IBOutlet weak var maskedDOB: XuniMaskedTextField! + @IBOutlet weak var maskedPhone: XuniMaskedTextField! + @IBOutlet weak var maskedState: XuniMaskedTextField! + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view, typically from a nib. + self.maskedID.mask = "000-00-0000" + self.maskedDOB.mask = "90/90/0000" + self.maskedPhone.mask = "(999) 000-0000" + self.maskedState.mask = "LL" + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +}