Stephanehk

Member

Last active last year

  1. last year
    Sat Jul 9 07:49:06 2016
    Stephanehk started the conversation Making an Alert Reaper After Taking Photo.

    I have been working on this app for sometime now, and have recently come about this problem which I cannot get my head around.
    What I want to happen is:
    1. When the user holds down their finger on a map an alert appears which gives them the option of typing something in, canceling, taking a photo, and or pressing done (this is all shown below in the photo). Image of the alert
    When the user presses the take a photo option, they can pick a photo from their photo library
    Once they have chosen the photo, the same alert box reappears with all the previous information the user filled out there, and the default photo is replaced with the photo the user chose
    Step 3 is the part that I have no idea how to do, despite extensive googling. I would really appreciate your help. Thanks.
    Note: I have already tried adding "self.presentViewController(alert, animated: true, completion:{})" after the user selects their desired image, but this did not work.
    My code (just the part that regards the alert):

  2. Sun Jul 3 22:34:47 2016
    Stephanehk started the conversation UIView.text Showing Up as Nil.

    I am a Swift beginner. I am creating a simple Parse notepad iOS app, for practice. I am trying to access from one class a uitextview created in another class. This leads to an error the uitextview is nil.
    For example, my tableviewcell class is very simple and only has two uiviews connected to it (the outlets are connected properly):

    @IBOutlet weak var titleLabel: UITextView! @IBOutlet weak var descriptionLabel: UITextView! override func awakeFromNib() { titleLabel.text = "Title" descriptionLabel.text = "Description" }
    I then try and access these properties from my detailviewcontroller class, but the error"unexpectedly found nil when unwrapping an optional" comes up, even though my titleLabel and descriptionLabel both have values that are set programmatically.
    detailviewcontroller class (this is in viewdidload):

    let customCell = TableViewCell() var Title = customCell.titleLabel.text let Description = customCell.descriptionLabel.text

    I would really appreciate your help. Thanks.
    *Also please note that my IBOutlets are connected properly

  3. Sun Jul 3 22:33:52 2016
    Stephanehk joined the forum.