drawRect / Instagram_Stories

Inspired by Instagram Stories functionality. This source is similar to Instagram Stories, which is having both image and video support.
MIT License
414 stars 76 forks source link

How can I comment on the particular post ? #115

Closed ajaychaudharkansal closed 3 years ago

ajaychaudharkansal commented 3 years ago

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

ranmyfriend commented 3 years ago

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.

ajaychaudharkansal commented 3 years ago

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.

ranmyfriend commented 3 years ago

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

ajaychaudharkansal commented 3 years ago

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.