Post

Replies

Boosts

Views

Activity

Comment on JSON parsing from a static JSON file into the label
In case of the album art - am i doing it right?: `                if let artUrl = URL(string: radio.nowPlaying.song.art) {                 //I need to load an image from artUrl                     let imageDatatask = session.dataTask(with: artUrl) { imageData, imageResponse, imageError in                     let albumArt = UIImage(data: imageData!)                     //let albumView = UIImageView(image: albumArt)                     }                     imageDatatask.resume()                     }`
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’21
Comment on JSON parsing from a static JSON file into the label
I think I've got two options: the first one is a workaround to call API every 5 seconds (I dont know if it is good idea) - is it hard to make it? The other option is to create webhook - my application can send POST HTTP request to the given URL of the webhook. POST is exactly the same as this: https://admin.radiopromil.online/api/nowplaying , but than I have still the problem with forcing the app to fetch data from webhook url.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’21
Comment on Print location shared when user tap 'locate me' button
Yes, but it is only visible only when you start the app, but I would like to see the alert when user tap the button myLocationButtonTapped and only than when location sharing is set to never.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Print location shared when user tap 'locate me' button
I dont know how to detect if user has not sharing location, when he tap the button myLocationButtonTapped - I would like to show an alert that he is not sharing the location.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Problem with using switch with annotation view customization
Yup, thats what I did, thanks!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to add different actions to rightCalloutAcessoryView button for each annotation?
I thin I should put somewhere return annotationViw after switch, but it will get me only colors istead of rightbutton function.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to add different actions to rightCalloutAcessoryView button for each annotation?
It also shows the number on the map before title.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to add different actions to rightCalloutAcessoryView button for each annotation?
Hey, thanks it is mostly clear, I've added new answer.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to add different actions to rightCalloutAcessoryView button for each annotation?
Yes, thank you. I will try it this way, looks understandable. @Claude31 do you know how to add to such button like this in annotationView function to open directions (MKLaunchOptionsDirectionsModeDriving) in Apple or Google Maps?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to store users data - saving reached locations name
Thanks, it worked with the button inside pinView - I did the same as in here: https://stackoverflow.com/questions/41495956/how-to-add-button-to-mkpointannotation-in-swift cause I needed the same button. Now I'm trying with storing data :)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on How to store users data - saving reached locations name
@Claude31 Thank you. I'll try it on later today. Also, can you give me a tip how to start dealing with the question of how to store this data? I would like this data to be kept when user will exit the app. I would like to show that stored data in the list in my second ViewController (szczyt.name and Pin image icon). Thank you in advance.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on MPRemoteCommandCenter - Show Now Playing info
@OOPer yes, that was my mistake, sorry. Thanks for your reply. I have one more question - Is there a simple way to add airplay audio button in the app? You know - the one in you can choose audio output. I can see the button on the lock screen control center.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on MPRemoteCommandCenter - Show Now Playing info
Many thanks - it helped me with the general overlooka t the code. @OOPer but when I try to add it in API call i've got Argument passed to call that takes no arguments. and Cannot find 'artwork' in scope. If I put it outside DispatchQueue.main.async of the album art it could not find albumArt in scope.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Fetch data from API every 5 seconds
Thank you! My mistake was that I was trying it totally different way, without requestNowPlaying(). Now I will try to this again on my own. Enjoy your weekend!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Fetch data from API every 5 seconds
Thanks. I've responded in the comment section of the question part.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on JSON parsing from a static JSON file into the label
In case of the album art - am i doing it right?: `                if let artUrl = URL(string: radio.nowPlaying.song.art) {                 //I need to load an image from artUrl                     let imageDatatask = session.dataTask(with: artUrl) { imageData, imageResponse, imageError in                     let albumArt = UIImage(data: imageData!)                     //let albumView = UIImageView(image: albumArt)                     }                     imageDatatask.resume()                     }`
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on JSON parsing from a static JSON file into the label
I think I've got two options: the first one is a workaround to call API every 5 seconds (I dont know if it is good idea) - is it hard to make it? The other option is to create webhook - my application can send POST HTTP request to the given URL of the webhook. POST is exactly the same as this: https://admin.radiopromil.online/api/nowplaying , but than I have still the problem with forcing the app to fetch data from webhook url.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’21