drawRect/Instagram_Stories

How can I comment on the particular post ?

ajaychaudharkansal opened this issue · 4 comments

Hello Sir,

Can you please help me in this. I want to comment on the stories. For that I add the textfield in (IGStoryPreviewView class.) but I'm facing problem in that . Can you please help in this. it will be very helpful for me .

Thanks
Ajay

Hi @ajaychaudharkansal

You can add one Text field on IGStoryPreviewCell and there itself you can add text field delegates once user ends up what he commented out. Then try to get it from Previewcell to ViewController. Then do whatever you want.

Let us know if you face any issues.

Thanks @ranmyfriend

Yes doing the same , by mistake I added the textfield in IGStoryPreviewView class. Now I'm using IGStoryPreviewCell class . I got the text while commenting on the stories I also have to pause the progress bar , for that I'm understanging your code.

If I faec any problem then I will let you know.

Thanks for the reply.

Thanks for your quick confirmation @ajaychaudharkansal . for now, am closing this issue. if you face any issue in future. feel free to reopen 👍

hi @ranmyfriend

Thanks for your response , I done with the textfield part , now I'm doing something like , when user click on textfield than I want to open child view controller . For that I'm adding child controller on it . for that I'm using this code.

let popVC = controller.storyboard?.instantiateViewController(withIdentifier: "CommentOnMystryStyVC") as? CommentOnMystryStyVC
controller.addChild(popVC!)
popVC?.view.frame = (controller?.view.frame)!
controller?.view.addSubview(popVC!.view)
popVC?.didMove(toParent: controller)

But my app is getting crash. Please help me in this. I declare [ var controller: IGStoryPreviewController! ] in IGStoryPreviewCell class , but still getting popVC nil.

Please help me in this . I don't understand what I'm doing wrong in this.