diff --git a/Demo/TSPopoverDemo.xcodeproj/project.pbxproj b/Demo/TSPopoverDemo.xcodeproj/project.pbxproj index 43c84e4..5cae0ab 100644 --- a/Demo/TSPopoverDemo.xcodeproj/project.pbxproj +++ b/Demo/TSPopoverDemo.xcodeproj/project.pbxproj @@ -157,7 +157,7 @@ 5D1B3AFA155A34CB00156B09 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0610; ORGANIZATIONNAME = ar.ms; }; buildConfigurationList = 5D1B3AFD155A34CB00156B09 /* Build configuration list for PBXProject "TSPopoverDemo" */; @@ -222,10 +222,17 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -235,10 +242,14 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.1; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; @@ -247,14 +258,24 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.1; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; diff --git a/TSPopover.podspec b/TSPopover.podspec new file mode 100644 index 0000000..e0eba12 --- /dev/null +++ b/TSPopover.podspec @@ -0,0 +1,27 @@ +Pod::Spec.new do |s| + s.name = "TSPopover" + s.version = "0.1.0" + s.summary = "UIPopover like UI for iPhone" + s.description = <<-DESC + UIPopover like UI (with ActionSheet) for iPhone - there is lot's of work still to do. + DESC + s.homepage = "https://github.com/takashisite/TSPopover" + s.screenshots = "https://github.com/takashisite/TSPopover/raw/master/Screenshots/Screenshot_1.png", "https://github.com/takashisite/TSPopover/raw/master/Screenshots/Screenshot_2.png" + s.license = 'MIT' + s.author = { "Pawel 'Kender' Maczewski" => "kender@codingslut.com" } + s.source = { :git => "https://github.com/owlcoding/TSPopover.git", :tag => s.version.to_s } + + s.platform = :ios, '5.0' + s.ios.deployment_target = '5.0' + # s.osx.deployment_target = '10.7' + s.requires_arc = true + + s.source_files = 'TSPopover' + # s.resources = 'Assets' + + # s.ios.exclude_files = 'Classes/osx' + # s.osx.exclude_files = 'Classes/ios' + # s.public_header_files = 'Classes/**/*.h' + s.frameworks = 'QuartzCore' + # s.dependency 'JSONKit', '~> 1.4' +end \ No newline at end of file diff --git a/TSPopover/TSActionSheet.m b/TSPopover/TSActionSheet.m index 99c6a46..025618e 100644 --- a/TSPopover/TSActionSheet.m +++ b/TSPopover/TSActionSheet.m @@ -137,9 +137,9 @@ - (void) buildButtons UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(BORDER, buttonY, self.bounds.size.width-BORDER*2, buttonHeight); button.titleLabel.font = [UIFont boldSystemFontOfSize:16]; - button.titleLabel.minimumFontSize = 6; + button.titleLabel.minimumScaleFactor = 6; button.titleLabel.adjustsFontSizeToFitWidth = YES; - button.titleLabel.textAlignment = UITextAlignmentCenter; + button.titleLabel.textAlignment = NSTextAlignmentCenter; button.backgroundColor = [UIColor clearColor]; button.tag = i++; @@ -199,7 +199,7 @@ - (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)anim - (void)buttonClicked:(id)sender { /* Run the button's block */ - int buttonIndex = [sender tag] - 1; + NSInteger buttonIndex = [sender tag] - 1; [self dismissWithClickedButtonIndex:buttonIndex animated:YES]; } diff --git a/TSPopover/TSPopoverController.m b/TSPopover/TSPopoverController.m index fb2fc74..28bf62b 100644 --- a/TSPopover/TSPopoverController.m +++ b/TSPopover/TSPopoverController.m @@ -48,10 +48,6 @@ - (id)init { self.popoverBaseColor = [UIColor blackColor]; self.popoverGradient = YES; screenRect = [[UIScreen mainScreen] bounds]; - if(self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight){ - screenRect.size.width = [[UIScreen mainScreen] bounds].size.height; - screenRect.size.height = [[UIScreen mainScreen] bounds].size.width; - } self.view.frame = screenRect; screenRect.origin.y = 0; screenRect.size.height = screenRect.size.height-20;