KpopTwitter, one of the most popular hashtags available on Twitter, recorded 6.1 billion tweets in 2019 alone. Interaction with these tweets increased by 15 percent last year. K-pop bands BTS and Exo topped with the highest number of tweets. It is important for any K-pop fan to know what their favorite band or band member is doing, but that only means countless taps and swipes on the internet. The widget provides an interesting way to learn things at a glance.
iOS 14 is the latest operating system from Apple and it is definitely the most powerful. It has many features and widgets is one of them. Widgets are small floating icons of variable size that allow users to preview them in their favorite apps without having to open them. Widgets are updated daily, which means users can unlock their iPhones and see any updates instantly.
A researcher on Twitter has paid tribute to the hashtag #KpopTwitter, which creates a great widget for iOS devices. This widget gives users access to updates on the K-Pop world by scrolling through tons of photos every day.
Creates Twitter Widget for K-Pop
Daniel, a researcher on the Twitter developer blog, posted how he created a widget that allows K-Pop fans to stay in touch.
The widget is updated daily with images from Twitter. Widget users understand the context of any tweet and use it to make “tweet comments” and display attached images. Twitter API v2 users with machine learning templates for tweet comments. It uses filtered streams or endpoints like recent searches to get the best results you can.
The researcher used 55.88810515303838958593 (Music section – K-Pop) as a commentary for a search query. Here, the widget extension tells you how often to update the content in the widget. Additionally, the OS takes screen time, parent application status, and other parameters to update content accordingly. Here is the code for the widget that is updated every hour.
Using the results obtained from the above code, the timeline object is classified into 24 tweets per hour. By understanding the above code, the widget updates entries every hour.
There is no shortage of tweets on Twitter, so there is no endpoint. However, the “.atEnd” object ensures that OS 24 creates a timeline of tweets for a fresh start. The widget kit ensures that the tweets shown are adjusted according to the time and date posted.
The researcher uses Swift UI to create the widget’s user interface for the home screen. Take the author’s picture, profile picture, and name and complete the work with the following code.
The full project of the widget is already available on Twitter Dev GitHub, you can access it here.