-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RatingView is now usable from ObjC, fixed error with initWithFrame me…
…thod delegate property is weak now
- Loading branch information
Peter Prokop
committed
Nov 26, 2015
1 parent
d1fb986
commit 5b6e495
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// ObjCViewController.h | ||
// StarryStarsExample | ||
// | ||
// Created by Peter Prokop on 26/11/15. | ||
// Copyright © 2015 Peter Prokop. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ObjCViewController : UIViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// ObjCViewController.m | ||
// StarryStarsExample | ||
// | ||
// Created by Peter Prokop on 26/11/15. | ||
// Copyright © 2015 Peter Prokop. All rights reserved. | ||
// | ||
|
||
#import "ObjCViewController.h" | ||
#import "StarryStarsExample-Swift.h" | ||
|
||
@interface ObjCViewController()<RatingViewDelegate> | ||
|
||
@end | ||
|
||
@implementation ObjCViewController | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
|
||
RatingView* rv = [[RatingView alloc] initWithFrame:self.view.bounds]; | ||
[self.view addSubview:rv]; | ||
rv.editable = YES; | ||
rv.delegate = self; | ||
} | ||
|
||
- (void)didReceiveMemoryWarning { | ||
[super didReceiveMemoryWarning]; | ||
} | ||
|
||
- (void)ratingView:(RatingView * __nonnull)ratingView didChangeRating:(float)newRating { | ||
NSLog(@"newRating: %f", newRating); | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to expose to Swift. | ||
// | ||
|