Working Swift example
Hey,
I am new to iOS development and have zero knowledge of Objective-C. Started Swift with Beta 6.0.1. So excuse me for silly questions.
This is an awesome project and would love to use it. As I seen from all FAQ's you don't seem like a big fans of Swift. After almost a day of experimenting and searching, I haven't really moved much. [Possibly I am just an idiot.].
As I can see from issues, people actually got it working with Swift. Is it possible to make some sort of working example ? Like you have Objective-C Demo in your repo ? I do assume you are all busy, so If you would somewhat help me with my sample I will try to write a demo for Swift.
I got up to this point. Swift does not show any errors in build. And all protocols seem to conform. But all I am seeing is blank page. https://gist.github.com/Katafalkas/8336d283a5ccc84a4ec4
Thanks @Katafalkas !
On the contrary, I love Swift:
I would love to rewrite it in Swift eventually. We'll see what happens.
But, this was (obviously) written before Swift.
I think having a Swift demo project is a great idea. I'll see if I can get this ready by the next release.
Of course, pull-request for this are welcome.
For anyone here interested, I would like to see:
- An entirely new directory:
Swift-Example/ - with a new local
Podfile - the Swift demo should be built similarly to the Objective-C one
@Katafalkas - also, you may want to reach out to those in the community who have successfully used this with Swift.
Ok. If you don't mind I will tag people here, who I assume got this working.
Hey @macdonjo @mschinis @nickoneill . By any chance you could share some working examples ?
I got it working. I maintain Swift-Playground where I have implementations of multiple cool libraries. This one is one of them. Feel free to check it out.
Thanks @mschinis !
The folks at Firebase have also created this project, which is in swift and uses JSQMessagesViewController:
https://github.com/firebase/ios-swift-chat-example
Thanks @ogoog ! :+1: :sunglasses:
No worries @jessesquires :) Love your work. Keep at it! I will be improving my example to provide a better documentation as soon as I get the app I'm working on published on the AppStore :sunglasses: @ogoog That looks pretty awesome.
I recommend taking a look at https://github.com/evermeer/EVCloudKitDao Not mine, but helped me fix the avatar issues I was struggling with.
Are there any updates on this issue? I'm currently building in swift and unable to get anything to load. The View controller remains empty despite using the demos provided above.
It works fine for me @jayisidoro.
On Fri, 15 May 2015 at 00:08 jayisidoro [email protected] wrote:
Are there any updates on this issue? I'm currently building in swift and unable to get anything to load. The View controller remains empty despite using the demos provided above.
— Reply to this email directly or view it on GitHub https://github.com/jessesquires/JSQMessagesViewController/issues/675#issuecomment-102196019 .
@mschinis i tried yours and it didn't work(just the datasourcedelegate issue) but i copied the rest of your code and it was a great foundation! i just figured out how to get the tool bar to display along with messages being. However, i'm not able to adjust the height of the collectionview, nor the buttons on the navigation controller, or other arbitrary UI aspects. Is that something that needs to be done in the VC subclassing JSQMessagesVC or another location? thank you!
My images came distorted after downloading in Background I solve it adding mediaView.contentMode = UIViewContentModeScaleAspectFit; in the JSQMessagesCollectionViewCell.m. Is this the right way to do it?
Replaced by #1608