diff --git a/DEComposeView.xib b/DEComposeView.xib index 10f9f9b..1703f85 100755 --- a/DEComposeView.xib +++ b/DEComposeView.xib @@ -1,14 +1,14 @@ - 1536 - 11E53 - 2840 - 1138.47 - 569.00 + 1552 + 12C60 + 3084 + 1187.34 + 625.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 + 2083 IBProxyObject @@ -316,11 +316,48 @@ NO + + + 290 + {{0, 9}, {312, 24}} + + + + _NS:328 + + 3 + MCAwAA + + NO + YES + 3 + NO + IBCocoaTouchFramework + Title + + 3 + MC40NjgyMzIzMDQyAA + + + 1 + 10 + 1 + + 2 + 20 + + + Helvetica-Bold + 20 + 16 + + NO + {{4, 25}, {312, 189}} - + _NS:196 NO @@ -332,6 +369,7 @@ {{244, 68}, {79, 34}} + _NS:567 NO IBCocoaTouchFramework @@ -484,6 +522,14 @@ 69 + + + titleLabel + + + + 73 + cancel @@ -564,6 +610,7 @@ + @@ -648,6 +695,11 @@ + + 72 + + + @@ -674,12 +726,14 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + DEEmbossedLabel + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 70 + 73 @@ -828,6 +882,6 @@ {78, 34} {12, 30} - 1926 + 2083 diff --git a/DEComposeViewController.h b/DEComposeViewController.h index 20a1c80..0d901a5 100755 --- a/DEComposeViewController.h +++ b/DEComposeViewController.h @@ -47,6 +47,7 @@ @property (retain, nonatomic) NSString *latString; @property (retain, nonatomic) NSString *lonString; @property BOOL showCoordinates; +@property BOOL useLocation; - (IBAction)send; diff --git a/DEComposeViewController.m b/DEComposeViewController.m index 32f8f4b..b2e61aa 100755 --- a/DEComposeViewController.m +++ b/DEComposeViewController.m @@ -75,6 +75,7 @@ @implementation DEComposeViewController // Public @synthesize completionHandler = _completionHandler; @synthesize alwaysUseDETwitterCredentials = _alwaysUseDETwitterCredentials; +@synthesize useLocation = _useLocation; // Private @synthesize text = _text; @@ -281,8 +282,12 @@ - (void)viewDidLoad self.lonString = nil; // default to add current location - self.locationManager = [[CLLocationManager alloc] init]; - [self startUpdatingLocation]; + if (_useLocation) { + self.locationManager = [[CLLocationManager alloc] init]; + [self startUpdatingLocation]; + } else { + self.locButton.hidden = YES; + } } @@ -466,7 +471,7 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLoca self.lonString = [NSString stringWithFormat:@"%f", self.bestEffortAtLocation.coordinate.longitude]; } --(void)startUpdatingLocation { +-(void)startUpdatingLocation { self.locationManager.delegate = self; self.locationManager.distanceFilter = kCLDistanceFilterNone; self.locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; diff --git a/DEComposeViewController.podspec b/DEComposeViewController.podspec new file mode 100644 index 0000000..55d2569 --- /dev/null +++ b/DEComposeViewController.podspec @@ -0,0 +1,21 @@ +# +# Be sure to run `pod spec lint DEComposeViewController.podspec' to ensure this is a +# valid spec. +# +# Remove all comments before submitting the spec. Optional attributes are commented. +# +# For details see: https://github.com/CocoaPods/CocoaPods/wiki/The-podspec-format +# +Pod::Spec.new do |s| + s.name = "DEComposeViewController" + s.version = "1.0.0" + s.summary = "A generic message entry view controller using the style of iOS compose view controllers (like tweet sheets)." + s.description = "A generic message entry view controller using the style of iOS compose view controllers (like tweet sheets). Based on the excellent tweet sheet based control DETweetComposeViewController from DoubleEncore." + s.homepage = "https://github.com/pj4533/DEComposeViewController" + s.author = 'PJ Gray' + s.license = "BSD" + s.source = { :git => "https://github.com/RobertoEstrada/DEComposeViewController.git", :tag => "1.0.0" } + s.platform = :ios + s.source_files = '*.{h,m}' + s.resources = "*.xib", "Resources/*.png" +end diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1a5ad7b --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2011 Double Encore, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the distribution. Neither the name of the Double Encore Inc. nor the names of its +contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file