Permalink
Browse files

Update repository

  • Loading branch information...
2 parents 688c516 + 2ac596f commit 5ecdb092c130445016330815cb82024efc6b26b8 @lludo lludo committed Nov 27, 2013
Showing with 2,032 additions and 937 deletions.
  1. +2 −0 .gitignore
  2. +39 −0 AppledocSettings.plist
  3. +34 −6 QuickDialog.podspec
  4. +157 −107 QuickDialog.xcodeproj/project.pbxproj
  5. +7 −0 README.markdown
  6. +15 −0 extras/QColorPickerElement.h
  7. +97 −0 extras/QColorPickerElement.m
  8. +35 −0 extras/QMailElement.h
  9. +78 −0 extras/QMailElement.m
  10. +1 −1 {quickdialog → extras}/QMapAnnotation.h
  11. +1 −1 {quickdialog → extras}/QMapAnnotation.m
  12. +3 −0 {quickdialog → extras}/QMapElement.h
  13. +1 −1 {quickdialog → extras}/QMapElement.m
  14. +1 −1 {quickdialog → extras}/QMapViewController.h
  15. +2 −0 {quickdialog → extras}/QMapViewController.m
  16. +1 −1 {quickdialog → extras}/QPickerElement.h
  17. 0 {quickdialog → extras}/QPickerElement.m
  18. 0 {quickdialog → extras}/QPickerTabDelimitedStringParser.h
  19. 0 {quickdialog → extras}/QPickerTabDelimitedStringParser.m
  20. 0 {quickdialog → extras}/QPickerTableViewCell.h
  21. +5 −20 {quickdialog → extras}/QPickerTableViewCell.m
  22. 0 {quickdialog → extras}/QPickerValueParser.h
  23. +5 −0 {quickdialog → extras}/QWebElement.h
  24. +11 −3 {quickdialog → extras}/QWebElement.m
  25. 0 {quickdialog → extras}/QWebViewController.h
  26. +23 −19 {quickdialog → extras}/QWebViewController.m
  27. +16 −0 extras/UIColor+ColorUtilities.h
  28. +41 −0 extras/UIColor+ColorUtilities.m
  29. +1 −1 quickdialog/DOAutocompleteTextField.h
  30. +3 −3 quickdialog/DOAutocompleteTextField.m
  31. +1 −1 quickdialog/NSMutableArray+MoveObject.h
  32. +22 −0 quickdialog/QAppearance.h
  33. +32 −28 quickdialog/QAppearance.m
  34. +1 −1 quickdialog/QAutoEntryTableViewCell.h
  35. +11 −6 quickdialog/QAutoEntryTableViewCell.m
  36. +6 −2 quickdialog/QBadgeElement.h
  37. +7 −2 quickdialog/QBadgeElement.m
  38. +1 −1 quickdialog/QBadgeLabel.h
  39. +2 −2 quickdialog/QBadgeLabel.m
  40. +1 −1 quickdialog/QBadgeTableCell.h
  41. +6 −2 quickdialog/QBadgeTableCell.m
  42. +1 −1 quickdialog/QBindingEvaluator.h
  43. +17 −5 quickdialog/QBindingEvaluator.m
  44. +4 −0 quickdialog/QBooleanElement.h
  45. +14 −3 quickdialog/QBooleanElement.m
  46. +5 −1 quickdialog/QButtonElement.h
  47. +1 −2 quickdialog/QButtonElement.m
  48. +12 −0 quickdialog/QClassicAppearance.h
  49. +178 −0 quickdialog/QClassicAppearance.m
  50. +1 −1 quickdialog/QDateEntryTableViewCell.h
  51. +41 −65 quickdialog/QDateEntryTableViewCell.m
  52. +4 −1 quickdialog/QDateTimeElement.h
  53. +2 −1 quickdialog/QDateTimeElement.m
  54. +3 −4 quickdialog/QDateTimeInlineElement.h
  55. +6 −5 quickdialog/QDateTimeInlineElement.m
  56. +8 −4 quickdialog/QDecimalElement.h
  57. +28 −8 quickdialog/QDecimalElement.m
  58. +1 −1 quickdialog/QDecimalTableViewCell.h
  59. +13 −10 quickdialog/QDecimalTableViewCell.m
  60. +1 −1 quickdialog/QDynamicDataSection.h
  61. +6 −5 quickdialog/QDynamicDataSection.m
  62. +6 −2 quickdialog/QElement+Appearance.m
  63. +6 −0 quickdialog/QElement.h
  64. +2 −3 quickdialog/QElement.m
  65. +1 −1 quickdialog/QEmptyListElement.h
  66. +3 −3 quickdialog/QEmptyListElement.m
  67. +8 −0 quickdialog/QEntryElement.h
  68. +11 −6 quickdialog/QEntryElement.m
  69. +0 −6 quickdialog/QEntryTableViewCell.h
  70. +40 −74 quickdialog/QEntryTableViewCell.m
  71. +14 −0 quickdialog/QFlatAppearance.h
  72. +73 −0 quickdialog/QFlatAppearance.m
  73. +5 −1 quickdialog/QFloatElement.h
  74. +30 −21 quickdialog/QFloatElement.m
  75. +15 −0 quickdialog/QFloatTableViewCell.h
  76. +42 −0 quickdialog/QFloatTableViewCell.m
  77. +2 −3 quickdialog/QImageElement.h
  78. +9 −0 quickdialog/QImageElement.m
  79. +1 −1 quickdialog/QImageTableViewCell.h
  80. +10 −16 quickdialog/QImageTableViewCell.m
  81. +5 −0 quickdialog/QLabelElement.h
  82. +10 −5 quickdialog/QLabelElement.m
  83. +1 −1 quickdialog/QLoadingElement.h
  84. +1 −1 quickdialog/QMultilineElement.h
  85. +2 −1 quickdialog/QMultilineElement.m
  86. +8 −7 quickdialog/QMultilineTextViewController.m
  87. +14 −0 quickdialog/QProgressElement.h
  88. +43 −0 quickdialog/QProgressElement.m
  89. +7 −0 quickdialog/QRadioElement.h
  90. +23 −11 quickdialog/QRadioElement.m
  91. +0 −2 quickdialog/QRadioItemElement.m
  92. +5 −1 quickdialog/QRadioSection.h
  93. +2 −1 quickdialog/QRadioSection.m
  94. +12 −1 quickdialog/QRootBuilder.m
  95. +1 −1 quickdialog/QRootElement+JsonBuilder.h
  96. +16 −0 quickdialog/QRootElement.h
  97. +44 −2 quickdialog/QRootElement.m
  98. +3 −1 quickdialog/QSection.h
  99. +4 −1 quickdialog/QSection.m
  100. +1 −1 quickdialog/QSegmentedElement.h
  101. +8 −51 quickdialog/QSegmentedElement.m
  102. +6 −1 quickdialog/QSelectItemElement.h
  103. +47 −15 quickdialog/QSelectItemElement.m
  104. +5 −1 quickdialog/QSelectSection.h
  105. +22 −1 quickdialog/QSelectSection.m
  106. +5 −1 quickdialog/QSortingSection.h
  107. +1 −1 quickdialog/QSortingSection.m
  108. +4 −2 quickdialog/QTableViewCell.h
  109. +59 −13 quickdialog/QTableViewCell.m
  110. +5 −5 quickdialog/QTextElement.h
  111. +7 −9 quickdialog/QTextElement.m
  112. +1 −1 quickdialog/QTextField.h
  113. +2 −2 quickdialog/QTextField.m
  114. +6 −12 quickdialog/QuickDialog.h
  115. +8 −4 quickdialog/QuickDialogController+Animations.h
  116. +26 −54 quickdialog/QuickDialogController+Animations.m
  117. +1 −1 quickdialog/QuickDialogController+Helpers.h
  118. +1 −1 quickdialog/QuickDialogController+Helpers.m
  119. +1 −1 quickdialog/QuickDialogController+Loading.h
  120. +4 −2 quickdialog/QuickDialogController+Loading.m
  121. +6 −1 quickdialog/QuickDialogController+Navigation.h
  122. +25 −23 quickdialog/QuickDialogController+Navigation.m
  123. +4 −0 quickdialog/QuickDialogController.h
  124. +22 −1 quickdialog/QuickDialogController.m
  125. +1 −1 quickdialog/QuickDialogDataSource.h
  126. +4 −1 quickdialog/QuickDialogDataSource.m
  127. +1 −1 quickdialog/QuickDialogTableDelegate.h
  128. +10 −93 quickdialog/QuickDialogTableDelegate.m
  129. +5 −9 quickdialog/QuickDialogTableView.h
  130. +27 −32 quickdialog/QuickDialogTableView.m
  131. +1 −1 quickdialog/QuickDialogWebController.h
  132. +1 −1 quickdialog/QuickDialogWebController.m
  133. +1 −1 sample/AboutController.m
  134. +1 −0 sample/ExampleViewController.m
  135. +1 −1 sample/JsonDataSampleController.h
  136. +1 −1 sample/JsonDataSampleController.m
  137. +2 −2 sample/LoginController.h
  138. +19 −16 sample/LoginController.m
  139. +1 −1 sample/LoginInfo.h
  140. +1 −1 sample/LoginInfo.m
  141. +1 −0 sample/PeriodPickerValueParser.h
  142. +54 −15 sample/Resources/jsonremote.json
  143. +1 −1 sample/Resources/loginform.json
  144. +19 −16 sample/Resources/sample.json
  145. +2 −2 sample/SampleDataBuilder.h
  146. +107 −36 sample/SampleDataBuilder.m
  147. BIN { → sample}/icon.png
  148. BIN { → sample}/icon@2x.png
  149. BIN { → sample}/iconIpad.png
View
@@ -13,3 +13,5 @@ build/
xcuserdata
.idea/*
+
+xcshareddata
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>--company-id</key>
+ <string>com.escoz</string>
+ <key>--logformat</key>
+ <integer>1</integer>
+ <key>--project-name</key>
+ <string>QuickDialog</string>
+ <key>--project-company</key>
+ <string>Escoz</string>
+ <key>--print-settings</key>
+ <true/>
+ <key>--output</key>
+ <array>
+ <string>./docs</string>
+ </array>
+ <key>--keep-intermediate-files</key>
+ <false/>
+ <key>--create-html</key>
+ <true/>
+ <key>--keep-undocumented-members</key>
+ <true/>
+ <key>--keep-undocumented-objects</key>
+ <true/>
+ <key>--create-docset</key>
+ <false/>
+ <key>--ignore</key>
+ <array>
+ <string>./sample</string>
+ <string>./extras</string>
+ </array>
+ <key>--index-desc</key>
+ <string>./README.markdown</string>
+ <key>--verbose</key>
+ <integer>4</integer>
+</dict>
+</plist>
View
@@ -1,20 +1,48 @@
Pod::Spec.new do |s|
s.name = 'Kwarter-QuickDialog'
- s.version = '0.6'
- s.platform = :ios
+ s.version = '0.9.1'
+ s.platform = :ios, '5.0'
s.license = 'Apache License, Version 2.0'
s.summary = 'Quick and easy dialog screens for iOS.'
s.homepage = 'http://escoz.com/quickdialog'
s.author = { 'Eduardo Scoz' => 'contact@escoz.com' }
- s.source = { :git => 'https://github.com/kwarter/Kwarter-QuickDialog.git', :tag => '0.6' }
+ s.source = { :git => 'https://github.com/kwarter/Kwarter-QuickDialog.git', :tag => "#{s.version}" }
s.description = 'QuickDialog allows you to create HIG-compliant iOS forms for your apps without ' \
'having to directly deal with UITableViews, delegates and data sources. Fast ' \
'and efficient, you can create forms with multiple text fields, or with ' \
'thousands of items with no sweat!'
- s.source_files = 'quickdialog'
+
s.requires_arc = true
- s.frameworks = 'MapKit', 'CoreLocation'
+ s.default_subspec = "Core"
+
+ s.subspec "Core" do |sp|
+ sp.source_files = 'quickdialog', '*.{h,m}'
+ end
+
+ s.subspec "Extras" do |sp|
+ sp.source_files = 'extras', '*.{h,m}'
+ end
+
+ s.subspec "QPicker" do |sp|
+ sp.source_files = 'extras/QPicker*.{h,m}'
+ end
+ s.subspec "QMail" do |sp|
+ sp.source_files = 'extras/QMail*.{h,m}'
+ end
+ s.subspec "QMap" do |sp|
+ sp.source_files = 'extras/QMap*.{h,m}'
+ end
+ s.subspec "QWeb" do |sp|
+ sp.source_files = 'extras/QWeb*.{h,m}'
+ end
+ s.subspec "QColor" do |sp|
+ sp.source_files = 'extras/QColor*.{h,m}', 'extras/UIColor*.{h,m}'
+ end
- s.prefix_header_contents = '#ifdef __OBJC__', '#import "QuickDialog.h"', '#endif'
+ s.prefix_header_contents = <<-EOS
+#ifdef __OBJC__
+ #import "QuickDialog.h"
+#endif
+EOS
end
Oops, something went wrong.
View
@@ -5,6 +5,13 @@
## For more information and documentation, please go to [the project official website](http://escoz.com/open-source/quickdialog).
+<!-- MacBuildServer Install Button -->
+<div class="macbuildserver-block">
+ <a class="macbuildserver-button" href="http://macbuildserver.com/project/github/build/?xcode_project=QuickDialog.xcodeproj&amp;target=QuickDialogExample&amp;repo_url=git%3A%2F%2Fgithub.com%2Fescoz%2FQuickDialog.git&amp;build_conf=Release" target="_blank"><img src="http://com.macbuildserver.github.s3-website-us-east-1.amazonaws.com/button_up.png"/></a><br/><sup><a href="http://macbuildserver.com/" target="_blank">by MacBuildServer</a></sup>
+</div>
+<!-- MacBuildServer Install Button -->
+
+
QuickDialog allows you to create HIG-compliant iOS forms for your apps without having to directly deal with UITableViews, delegates and data sources. Fast and efficient, you can create forms with multiple text fields, or with thousands of items with no sweat!
![Sample](https://github.com/escoz/QuickDialog/raw/master/other/quickdialog2.png "Sample")
@@ -0,0 +1,15 @@
+//
+// QColorPickerElement.h
+// Color Picker
+//
+// Created by Ben Wyatt on 10/7/12.
+// Copyright (c) 2012 Quickfire Software. All rights reserved.
+//
+
+#import "QLabelElement.h"
+
+@interface QColorPickerElement : QRadioElement
+
+
+- (void)setSelectedColor:(id)o;
+@end
@@ -0,0 +1,97 @@
+//
+// QColorPickerElement.m
+// Color Picker
+//
+// Created by Ben Wyatt on 10/7/12.
+// Copyright (c) 2012 Quickfire Software. All rights reserved.
+//
+
+#import "QColorPickerElement.h"
+#import "UIColor+ColorUtilities.h"
+
+@implementation QColorPickerElement {
+ QSection *_internalRadioItemsSection;
+}
+
+
+- (QColorPickerElement *)init {
+ self = [super init];
+ if (self) {
+ self.items = @[
+ @[@"Black", [UIColor blackColor]],
+ @[@"White", [UIColor whiteColor]],
+ @[@"Gray", [UIColor grayColor]],
+ @[@"Blue", [UIColor blueColor]],
+ @[@"Red", [UIColor redColor]],
+ @[@"Green", [UIColor greenColor]],
+ @[@"Yellow", [UIColor yellowColor]],
+ @[@"Purple", [UIColor purpleColor]],
+ @[@"Magenta", [UIColor magentaColor]]
+ ];
+ self.selected = 0;
+ }
+ return self;
+}
+
+- (void)updateCell:(QEntryTableViewCell *)cell selectedValue:(id)selectedValue {
+ self.image = [self getImageFromItem:selectedValue];
+ [super updateCell:cell selectedValue:selectedValue];
+ if (self.title == NULL){
+ cell.textField.text = [[selectedValue objectAtIndex:0] description];
+ cell.detailTextLabel.text = nil;
+ cell.textField.textAlignment = self.appearance.labelAlignment;
+ } else {
+ cell.textLabel.text = _title;
+ cell.textField.text = [[selectedValue objectAtIndex:0] description];
+ cell.textField.textAlignment = self.appearance.valueAlignment;
+ }
+}
+
+- (UIImage *)getImageFromItem:(NSArray *)selectedValue {
+ id color = [selectedValue objectAtIndex:1];
+ if ([color isKindOfClass:[UIColor class]])
+ return [color imageByDrawingCircleOfColor];
+ if ([color isKindOfClass:[NSString class]])
+ return [[QColorPickerElement colorFromHexString:color] imageByDrawingCircleOfColor];
+ return [[UIColor blackColor] imageByDrawingCircleOfColor];
+}
+
+
+- (void)createElements {
+ _sections = nil;
+ self.presentationMode = QPresentationModeNavigationInPopover;
+ _internalRadioItemsSection = [[QSection alloc] init];
+ _parentSection = _internalRadioItemsSection;
+
+ [self addSection:_parentSection];
+
+ for (NSUInteger i=0; i< [_items count]; i++){
+ QRadioItemElement *element = [[QRadioItemElement alloc] initWithIndex:i RadioElement:self];
+ element.image = [self getImageFromItem:[self.items objectAtIndex:i]];
+ element.title = [[self.items objectAtIndex:i] objectAtIndex:0];
+ [_parentSection addElement:element];
+ }
+}
+
++ (UIColor *)colorFromHexString:(NSString *)hexString {
+ unsigned rgbValue = 0;
+ NSScanner *scanner = [NSScanner scannerWithString:hexString];
+ [scanner setScanLocation:1]; // bypass '#' character
+ [scanner scanHexInt:&rgbValue];
+ return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0];
+}
+
+- (void)setSelectedColor:(NSString *)colorName {
+ for (NSArray *item in _items){
+ if ([colorName isEqualToString:[item objectAtIndex:0]]) {
+ self.selected = [_items indexOfObject:item];
+ return;
+ }
+ }
+ self.selected = 0;
+
+ [self handleEditingChanged];
+}
+
+
+@end
View
@@ -0,0 +1,35 @@
+//
+// QMailElement.h
+// ConferencesBox
+//
+// Created by Richard Huang on 2/16/13.
+// Copyright (c) 2013 ConferencesBox. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <MessageUI/MessageUI.h>
+
+#import "QuickDialog.h"
+#import "QLabelElement.h"
+
+@interface QMailElement : QLabelElement <MFMailComposeViewControllerDelegate> {
+
+@protected
+ NSString *_subject;
+ NSString *_messageBody;
+ NSArray *_toRecipients;
+ NSArray *_ccRecipients;
+ NSArray *_bccRecipients;
+}
+
+@property(nonatomic, strong) NSString *subject;
+@property(nonatomic, strong) NSString *messageBody;
+@property(nonatomic, strong) NSArray *toRecipients;
+@property(nonatomic, strong) NSArray *ccRecipients;
+@property(nonatomic, strong) NSArray *bccRecipients;
+
+- (QMailElement *)initWithTitle:(NSString *)title subject:(NSString *)subject messageBody:(NSString *)messageBody toRecipients:(NSArray *)toRecipients ccRecipients:(NSArray *)ccRecipients bccRecipients:(NSArray *)bccRecipients;
+
+- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path;
+
+@end
View
@@ -0,0 +1,78 @@
+//
+// QMailElement.m
+// ConferencesBox
+//
+// Created by Richard Huang on 2/16/13.
+// Copyright (c) 2013 ConferencesBox. All rights reserved.
+//
+
+#import "QMailElement.h"
+
+@implementation QMailElement
+
+@synthesize subject = _subject;
+@synthesize messageBody = _messageBody;
+@synthesize toRecipients = _toRecipients;
+@synthesize ccRecipients = _ccRecipients;
+@synthesize bccRecipients = _bccRecipients;
+
+- (QMailElement *)initWithTitle:(NSString *)title subject:(NSString *)subject messageBody:(NSString *)messageBody toRecipients:(NSArray *)toRecipients ccRecipients:(NSArray *)ccRecipients bccRecipients:(NSArray *)bccRecipients {
+ self = [super init];
+ if (self != nil) {
+ _title = title;
+ _subject = subject;
+ _toRecipients = toRecipients;
+ _ccRecipients = ccRecipients;
+ _bccRecipients = bccRecipients;
+ }
+ return self;
+}
+
+- (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller {
+ self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ UITableViewCell *cell = [super getCellForTableView:tableView controller:controller];
+ cell.selectionStyle = UITableViewCellSelectionStyleBlue;
+ return cell;
+}
+
+
+- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path {
+ [self handleElementSelected:controller];
+
+ if([MFMailComposeViewController canSendMail]) {
+ MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
+ mc.mailComposeDelegate = self;
+ [mc setTitle:_title];
+ [mc setSubject:_subject];
+ [mc setMessageBody:_messageBody isHTML:NO];
+ [mc setToRecipients:_toRecipients];
+ [mc setCcRecipients:_ccRecipients];
+ [mc setBccRecipients:_bccRecipients];
+
+ [controller displayViewController:mc];
+ } else {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Mail Accounts" message:@"Please set up a Mail account in order to send email." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
+ [alert show];
+ }
+}
+
+- (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
+{
+ switch (result)
+ {
+ case MFMailComposeResultCancelled:
+ break;
+ case MFMailComposeResultSaved:
+ break;
+ case MFMailComposeResultSent:
+ break;
+ case MFMailComposeResultFailed:
+ NSLog(@"Mail sent failure: %@", [error localizedDescription]);
+ break;
+ default:
+ break;
+ }
+
+ [controller dismissViewControllerAnimated:YES completion:NULL];
+}
+@end
@@ -28,4 +28,4 @@
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
-@end
+@end
@@ -27,4 +27,4 @@ - (QMapAnnotation *)initWithCoordinate:(CLLocationCoordinate2D)coordinate title:
return self;
}
-@end
+@end
@@ -17,6 +17,9 @@
#import "QRootElement.h"
+/**
+ QMapElement: when selected, shows a fullscreen map with the location selected. Requires a lat/long value.
+*/
@interface QMapElement : QRootElement {
@@ -46,4 +46,4 @@ - (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogContro
[controller displayViewController:mapController];
}
-@end
+@end
@@ -27,4 +27,4 @@
- (QMapViewController *)initWithCoordinate:(CLLocationCoordinate2D)d;
- (QMapViewController *)initWithTitle:(NSString *)string coordinate:(CLLocationCoordinate2D)d;
-@end
+@end
@@ -39,6 +39,8 @@ - (QMapViewController *)initWithCoordinate:(CLLocationCoordinate2D)coordinate {
}
- (void)viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+
_mapView.region = MKCoordinateRegionMake(_coordinate, MKCoordinateSpanMake(0.05, 0.05));
_mapView.zoomEnabled = YES;
[_mapView regionThatFits:_mapView.region];
@@ -18,4 +18,4 @@
- (void)reloadAllComponents;
- (void)reloadComponent:(NSInteger)index;
-@end
+@end
File renamed without changes.
Oops, something went wrong.

0 comments on commit 5ecdb09

Please sign in to comment.