Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.
Open
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
27 changes: 24 additions & 3 deletions Demo/TSPopoverDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" */;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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";
Expand Down
27 changes: 27 additions & 0 deletions TSPopover.podspec
Original file line number Diff line number Diff line change
@@ -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" => "[email protected]" }
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
6 changes: 3 additions & 3 deletions TSPopover/TSActionSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down Expand Up @@ -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];
}

Expand Down
4 changes: 0 additions & 4 deletions TSPopover/TSPopoverController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down