Latest 0.0.2
Homepage https://github.com/KeithGapusan/DialogGameScore
License MIT
Platforms ios 9.0
Authors

GameScoreDialog

A reusable dialog for a 2 player project.

Packagist
Swift 4.0.x
Version

CocoaPods

https://cocoapods.org/pods/DialogGameScore

target 'MyApp' do
    pod 'DialogGameScore', '~> 0.0.2'
end

Objective-C

#import "DialogGameScore-Swift.h"

@interface ViewController () <GameDialogViewDelegate>

@end
@implementation ViewController

GameScoreDialog *gameView;

- (void)viewDidLoad {
    gameView = [[GameScoreDialog alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.origin.y - 100, self.view.frame.size.width, self.view.frame.size.height)];
    gameView.delegate = self;
    [self.view addSubview:gameView];
    /*if you want to set the label title*/
    gameView.tfHome.text = [NSString stringWithFormat:@"%@",self.gameDetailDictionary[@"total_score"]];;
}

/*delegate method*/
- (void)didPressedButton:(NSDictionary<NSString *,id> * _Nonnull)data {

    NSString *button = [data objectForKey:@"button"];
    if (){
        NSLog(@" %@" ,[data objectForKey:@"button"] );
        /**
            add your post method here
        **/
        NSDictionary *score = [data objectForKey:@"data"];
        NSLog(@" %@ %@" , [score objectForKey:@"homeScore"],[score objectForKey:@"oppponentScore"]  );
        [self.gameDetailDictionary addEntriesFromDictionary:score];
        //[self.gameDetailDictionary setObject:score forKey:@"score"];
        NSLog(@"%@" , self.gameDetailDictionary);
        }else{
            [gameView removeFromSuperview];
        }
}

Latest podspec

{
    "name": "DialogGameScore",
    "version": "0.0.2",
    "summary": "A reusable popup dialog for two player games.",
    "description": "A reusable popup dialog for two player games. This framework mainly used for my internal projects.",
    "homepage": "https://github.com/KeithGapusan/DialogGameScore",
    "license": "MIT",
    "authors": {
        "Keith Randell Gapusan": "[email protected]"
    },
    "social_media_url": "https://www.instagram.com/keithgapusan/",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/KeithGapusan/DialogGameScore.git",
        "tag": "0.0.2"
    },
    "source_files": "DialogGameScore/**/*.{h,m,swift,storyboard,xib.json}",
    "resource_bundles": {
        "DialogGameScore": [
            "DialogGameScore/**/*.{storyboard,xib,xcassets,json,imageset,png,swift}"
        ]
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.2"
    }
}

Pin It on Pinterest

Share This