Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions QuickDialog.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'QuickDialog'
s.version = '1.0'
s.version = '1.0.2'
s.platform = :ios, '5.0'
s.license = 'Apache License, Version 2.0'
s.summary = 'Quick and easy dialog screens for iOS.'
Expand All @@ -21,28 +21,9 @@ Pod::Spec.new do |s|
end

s.subspec "Extras" do |sp|
sp.dependency 'QuickDialog/Core'
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 = <<-EOS
#ifdef __OBJC__
#import "QuickDialog.h"
#endif
EOS
end
1,018 changes: 506 additions & 512 deletions QuickDialog.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion extras/QColorPickerElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (c) 2012 Quickfire Software. All rights reserved.
//

#import "QLabelElement.h"
#import "QuickDialog.h"

@interface QColorPickerElement : QRadioElement

Expand Down
2 changes: 0 additions & 2 deletions extras/QMailElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#import <Foundation/Foundation.h>
#import <MessageUI/MessageUI.h>

#import "QuickDialog.h"
#import "QLabelElement.h"

@interface QMailElement : QLabelElement <MFMailComposeViewControllerDelegate> {

Expand Down
5 changes: 0 additions & 5 deletions extras/QMailElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

@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];
Expand Down
4 changes: 0 additions & 4 deletions extras/QMapAnnotation.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

@implementation QMapAnnotation

@synthesize coordinate = _coordinate;
@synthesize title = _title;
@synthesize subtitle = _subtitle;

- (QMapAnnotation *)initWithCoordinate:(CLLocationCoordinate2D)coordinate title:(NSString *)title {
self = [super init];
self.coordinate = coordinate;
Expand Down
2 changes: 0 additions & 2 deletions extras/QMapElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

@implementation QMapElement

@synthesize coordinate = _coordinate;

- (QMapElement *)init {
self = [self initWithTitle:@"" coordinate:CLLocationCoordinate2DMake(0, 0)];
return self;
Expand Down
8 changes: 4 additions & 4 deletions extras/QPickerElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#import "QPickerTableViewCell.h"
#import "QPickerTabDelimitedStringParser.h"


NSString * const QPickerTableViewCellIdentifier = @"QPickerTableViewCell";

@implementation QPickerElement
{
@private
Expand All @@ -10,9 +13,6 @@ @implementation QPickerElement
UIPickerView *_pickerView;
}

@synthesize items = _items;
@synthesize valueParser = _valueParser;

- (QPickerElement *)init
{
if (self = [super init]) {
Expand All @@ -35,7 +35,7 @@ - (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView contr
{
QPickerTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:QPickerTableViewCellIdentifier];
if (cell == nil) {
cell = [[QPickerTableViewCell alloc] init];
cell = [[QPickerTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:QPickerTableViewCellIdentifier];
}
[cell applyAppearanceForElement:self];

Expand Down
2 changes: 0 additions & 2 deletions extras/QPickerTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#import "QEntryTableViewCell.h"

NSString * const QPickerTableViewCellIdentifier;

@interface QPickerTableViewCell : QEntryTableViewCell <UIPickerViewDataSource, UIPickerViewDelegate>
{
UIPickerView *_pickerView;
Expand Down
7 changes: 2 additions & 5 deletions extras/QPickerTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@
#import "QuickDialog.h"
#import "QPickerElement.h"

NSString * const QPickerTableViewCellIdentifier = @"QPickerTableViewCell";

@interface QPickerTableViewCell ()
@property (nonatomic, readonly) QPickerElement *pickerElement;
@end

@implementation QPickerTableViewCell

@synthesize pickerView = _pickerView;

- (QPickerTableViewCell *)init
- (QPickerTableViewCell *)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if ((self = [self initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:QPickerTableViewCellIdentifier]))
if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]))
{
[self createSubviews];
self.selectionStyle = UITableViewCellSelectionStyleBlue;
Expand Down
2 changes: 1 addition & 1 deletion extras/QWebElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//

#import <Foundation/Foundation.h>
#import "QLabelElement.h"
#import "QuickDialog.h"

/**
QWebElement: pushes a simple browser that opens the URL defined in the element
Expand Down
3 changes: 0 additions & 3 deletions extras/QWebElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

@implementation QWebElement

@synthesize url = _url;
@synthesize html = _html;

- (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url {
self = [super init];
if (self!=nil){
Expand Down
1 change: 0 additions & 1 deletion libQuickDialog/libQuickDialog-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifdef __OBJC__

#import <UIKit/UIKit.h>
#import "QuickDialog.h"

#endif

2 changes: 2 additions & 0 deletions quickdialog/QAppearance.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "QuickDialogTableView.h"


@interface QAppearance : NSObject<NSCopying>
Expand Down
13 changes: 3 additions & 10 deletions quickdialog/QAppearance.m
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
#import "QAppearance.h"
#import <UIKit/UIKit.h>
#import "QSection.h"

@implementation QAppearance {

}

@synthesize sectionTitleFont = _sectionTitleFont;
@synthesize sectionTitleColor = _sectionTitleColor;
@synthesize sectionFooterFont = _sectionFooterFont;
@synthesize sectionFooterColor = _sectionFooterColor;
@synthesize entryAlignment = _entryAlignment;
@synthesize buttonAlignment = _buttonAlignment;
@synthesize selectedBackgroundView = _selectedBackgroundView;
@synthesize sectionTitleShadowColor = _sectionTitleShadowColor;


- (QAppearance *)init {
self = [super init];
if (self) {
Expand Down
2 changes: 2 additions & 0 deletions quickdialog/QButtonElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// permissions and limitations under the License.
//

#import "QAppearance.h"
#import "QButtonElement.h"
#import "QElement+Appearance.h"

@implementation QButtonElement

Expand Down
2 changes: 1 addition & 1 deletion quickdialog/QClassicAppearance.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// To change the template use AppCode | Preferences | File Templates.
//


#import "QAppearance.h"
#import <Foundation/Foundation.h>


Expand Down
5 changes: 5 additions & 0 deletions quickdialog/QClassicAppearance.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
//


#import "QAppearance.h"
#import "QElement+Appearance.h"
#import "QClassicAppearance.h"
#import "QSection.h"
#import "QuickDialogTableView.h"
#import "QRootElement.h"


@implementation QClassicAppearance {
Expand Down
2 changes: 2 additions & 0 deletions quickdialog/QCountdownElement.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>

#import "QDateTimeInlineElement.h"


@interface QCountdownElement : QDateTimeInlineElement
@end
5 changes: 2 additions & 3 deletions quickdialog/QDateEntryTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
// permissions and limitations under the License.
//

#import "QAppearance.h"
#import "QEntryTableViewCell.h"
#import "QDateEntryTableViewCell.h"
#import "QDateTimeInlineElement.h"
#import "QTextField.h"
#import "QElement+Appearance.h"

@implementation QDateEntryTableViewCell

@synthesize pickerView = _pickerView;
@synthesize centeredLabel = _centeredLabel;


- (QDateEntryTableViewCell *)init {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Created by Eduardo Scoz on 1/11/14.
//

#import "QTableViewCell.h"
#import "QDateTimeInlineElement.h"
#import <Foundation/Foundation.h>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
//

#import "QAppearance.h"
#import "QElement.h"
#import "QElement+Appearance.h"
#import "QDateInlineTableViewCell.h"

@interface QDateInlineTableViewCell ()
Expand Down
3 changes: 1 addition & 2 deletions quickdialog/QDateTimeInlineElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#import "QuickDialogTableView.h"
#import "QEntryElement.h"

@class QDateEntryTableViewCell;
#import "QDateEntryTableViewCell.h"

@interface QDateTimeInlineElement : QEntryElement {
NSDate * _dateValue;
Expand Down
2 changes: 2 additions & 0 deletions quickdialog/QDateTimeInlineElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// permissions and limitations under the License.
//

#import "QDateEntryTableViewCell.h"
#import "QuickDialogController.h"
#import "QDateInlineTableViewCell.h"

@implementation QDateTimeInlineElement {
Expand Down
1 change: 1 addition & 0 deletions quickdialog/QElement+Appearance.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import <Foundation/Foundation.h>
#import "QElement.h"

@class QAppearance;

Expand Down
2 changes: 2 additions & 0 deletions quickdialog/QElement+Appearance.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#import <objc/runtime.h>
#import "QElement+Appearance.h"
#import "QClassicAppearance.h"
#import "QFlatAppearance.h"
#import "QRootElement.h"


static void * const KEY_APPEARANCE_OBJECT = (void*)&KEY_APPEARANCE_OBJECT;
Expand Down
2 changes: 2 additions & 0 deletions quickdialog/QEmptyListElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//

#import "QEmptyListElement.h"
#import "QAppearance.h"
#import "QElement+Appearance.h"

@implementation QEmptyListElement

Expand Down
1 change: 0 additions & 1 deletion quickdialog/QEntryElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//
#import "QLabelElement.h"
#import "QEntryTableViewCell.h"

@protocol QuickDialogEntryElementDelegate;

/**
Expand Down
4 changes: 4 additions & 0 deletions quickdialog/QEntryTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ - (void)prepareForElement:(QEntryElement *)element inTableView:(QuickDialogTable
_textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
_textField.textAlignment = _entryElement.appearance.entryAlignment;

// workaround for UITextField bug: if the user is using a bigger system font, a long text won't scroll
_textField.adjustsFontSizeToFitWidth = YES;
_textField.minimumFontSize = 20.0f;

_textField.returnKeyType = _entryElement.returnKeyType;
_textField.enablesReturnKeyAutomatically = _entryElement.enablesReturnKeyAutomatically;

Expand Down
1 change: 1 addition & 0 deletions quickdialog/QFlatAppearance.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#import <Foundation/Foundation.h>

#import "QAppearance.h"

@interface QFlatAppearance : QAppearance

Expand Down
1 change: 1 addition & 0 deletions quickdialog/QFlatAppearance.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


#import "QFlatAppearance.h"
#import "QSection.h"


@implementation QFlatAppearance {
Expand Down
1 change: 1 addition & 0 deletions quickdialog/QImageElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "QRootElement.h"
#import "QEntryElement.h"

@interface QImageElement : QEntryElement

Expand Down
3 changes: 3 additions & 0 deletions quickdialog/QImageElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// permissions and limitations under the License.
//

#import "QImageElement.h"
#import "QEntryElement.h"
#import "QuickDialogController+Navigation.h"
#import "QImageTableViewCell.h"

@interface QImageElement () <UINavigationControllerDelegate, UIImagePickerControllerDelegate, UIPopoverControllerDelegate>
Expand Down
2 changes: 1 addition & 1 deletion quickdialog/QMultilineElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ - (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogContro
__weak QMultilineTextViewController *weakTextController = textController;
textController.willDisappearCallback = ^ {
weakSelf.textValue = weakTextController.textView.text;
[[tableView cellForElement:weakSelf] setNeedsDisplay];
[tableView reloadCellForElements:weakSelf, nil];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
};
[controller displayViewController:textController withPresentationMode:self.presentationMode];
Expand Down
Loading