Closed ajaychaudharkansal closed 3 years ago
Hi @ajaychaudharkansal
If popVC is nil means you have to check this controller.storyboard?.instantiateViewController(withIdentifier: "CommentOnMystryStyVC") as? CommentOnMystryStyVC code.
Put breakpoint and check each values like, check controller value, check controller.storyboard? value, check controller.storyboard?.instantiateViewController(withIdentifier: "CommentOnMystryStyVC"). If any of the values are nil then only, the popVC gets nil. So, you need to validate that data.
Thanks for the response , done with this issues.
Actually I stuck on last point , when I have to remove the child controller than , I have to resume the progress bar by using this code.
let v = self.getProgressView(with: self.snapIndex) v?.resume()
the problem I'm facing here is I'm not able to understand how to call this function .
can you please help me in this .
Hi @ajaychaudharkansal
You no need to worry about the v?.resume and all.
In IGStoryPreviewCell, the methods are already available to do this job.
public func pauseEntireSnap()
public func resumeEntireSnap()
The above two methods you can find in IGStoryPreview and utilise it.
If you are having cell instance, then you can simply call cell.pauseEntireSnap(), cell.resumeEntireSnap() like this.
hi @ranmyfriend Thanks for the response. I will check it . I also have one more query . if I want to show text with story than I should I have to do .
hi @ranmyfriend , Please help me in this , I also want to show text along with images in stories. Please guide me how to do this .
Thanks
hi @ranmyfriend
I'm waiting for your response . Can you please guide for the points I mentioned you.
Hi @ajaychaudharkansal
Don't have idea, you can modify the code as per your wish to achieve your requirement,
okay Thanks @ranmyfriend . Thanks for the response
@ajaychaudharkansal Yeah, it's completely based on your requirement. and can you please help us see what exactly you want to do here? and if you have any wireframe or some kind of rough images. please attach here. So that we can confirm it once.
hi @ranmyfriend Thanks for the response . Please check the attachment.
In this in want to show text along with images. the green view is label .
https://user-images.githubusercontent.com/71260037/93319888-0e47ec00-f82e-11ea-994f-cd46bc949077.png
@ajaychaudharkansal Got it. This is kind of additional things you are attaching to the IGStory. I mean to say. Image or Video on top of this user can add something to it. This is we have not planned yet. Right now we don't have time to do this. Maybe in future, we will add this feature. You just search for any library or tool which you can implement this.
@ranmyfriend actually i searched a lot , but didn't find any of the library related to that .
If I want to modify in your code , than can you please tell me in which class I have to do modification.
I add this code in IGStoryPreviewCell
lazy var snapCommentOnImage : UILabel! = { let commentOnImage = UILabel(frame: CGRect(x: 10, y: self.bounds.height/1.5, width: UIScreen.main.bounds.width - 20, height: 30)) commentOnImage.textAlignment = .center commentOnImage.textColor = .red commentOnImage.backgroundColor = .green commentOnImage.font = UIFont.systemFont(ofSize: 25) commentOnImage.numberOfLines = 0 return commentOnImage }()
hi @ranmyfriend I done this part also . Thanks for very thing. I learned new things in this.
Thanks @ranmyfriend @boominadhaprakash .
Sounds Great 👍
Welcome!!! @ajaychaudharkansal
Facing issue while adding child controller
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.
_Originally posted by @ajaychaudharkansal in https://github.com/drawRect/Instagram_Stories/issues/115#issuecomment-692507178_