Skip to content

Instantly share code, notes, and snippets.

@somtd
Last active February 6, 2022 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save somtd/7872344 to your computer and use it in GitHub Desktop.
Save somtd/7872344 to your computer and use it in GitHub Desktop.
C4 sample project "Music List" #BLOG
#import "C4CanvasController.h"
typedef enum songListTag : NSUInteger {
Beethoven,
Ravel,
Bizet,
Dvorak,
Rachmaninov,
songListCount
} songListTag;
@protocol SongListDelegate;
@interface SongListWorkSpace : C4CanvasController
@property (nonatomic, readonly) int currentSongTag;
@property (assign, nonatomic) id<SongListDelegate> delegate;
-(NSString *)songTitleWithTag:(songListTag)tag;
-(NSString *)composerNameWithTag:(songListTag)tag;
@end
@protocol SongListDelegate <NSObject>
- (void)selectedSong:(songListTag)songTag;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment