2017-10-05 12 views

答えて

3

あなたは他のオブジェクトに任意の値を代入しているときはいつでも、他の値に一つの値をコピーすることを意味し、それはいつか、例外を送っていました。私の場合は

if(orginalEvent.structuredLocation != nil){ 
      newEvent.structuredLocation = orginalEvent.structuredLocation 
     } 

はだから、私は以下に置き換えられています

if(orginalEvent.structuredLocation != nil){ 
      if orginalEvent.structuredLocation!.title.characters.count > 0{ 

       let location = EKStructuredLocation(title: orginalEvent.structuredLocation!.title) 
       if(orginalEvent.structuredLocation?.geoLocation != nil){ 
        location.geoLocation = CLLocation(latitude: (orginalEvent.structuredLocation?.geoLocation?.coordinate.latitude)!, longitude: (orginalEvent.structuredLocation?.geoLocation?.coordinate.longitude)!) 
       } 

       newEvent.structuredLocation = location 
      } 

     } 

をので、それが今取り組んでいます。

関連する問題