Reputation: 551
I'm creating an iOS app using swift. I am using storyboard. I would like to use in my project this API, which was written using objective-C :
https://github.com/StefanLage/SLPagingView
I have done the bridging-header logic but problem is, I am not able to create a view controller with custom class SLPagingViewController in "Show the identity inspector"->"Custom class"->"Class". (Xcode just doesn't find it) I only can call this class programmatically in one of my swift file.
Any suggestions for using this API via storyboard?
Upvotes: 2
Views: 1216
Reputation: 722
I have downloaded the github code and tried using bridging header. It works as expected. Below are the screenshots & code which I added in bridging header file. Hope you did same steps but may be missed something.
//
// SwiftL1-Bridging-Header.h
// SwiftL1
//
// Created by uttamkumar_s on 4/13/15.
// Copyright (c) 2015 Uttam. All rights reserved.
//
#ifndef SwiftL1_SwiftL1_Bridging_Header_h
#define SwiftL1_SwiftL1_Bridging_Header_h
#import "SLPagingViewController.h"
#endif
Upvotes: 4