SwiftUI: ContentUnavailableView

SwiftUI was introduced by Apple at WWDC 2019 as a modern and declarative user interface framework for building apps across all Apple platforms. SwiftUI represented a significant shift in the way developers create user interfaces compared to the traditional UIKit or AppKit frameworks. SwiftUI was designed to make app development faster, easier, and more intuitive by providing a clear and concise syntax for describing UI layouts and behaviors. Swift UI keeps getting better and better with every WWDC!

In iOS 17, SwiftUI got a new view dedicated to presenting an empty state of your app, ContentUnavailableView.

This is what ContentUnavailableView look like out of the box.

When should we use ContentUnavailableView

As you might be able to guess from the name, ContentUnavailableView is meant to use when a view’s content can’t be displayed.

This can happen for many reasons, such as a network error, a list without items, or a search that returns no result.


How to use ContentUnavailableView

There are many ways we can use ContentUnavailableView. I will categorize them into three groups.

  1. Built-in unavailable views
  2. Custom unavailable views
  3. Unavailable views with actions

Built-in unavailable views

As discussed in the last section, ContentUnavailableView can be used in many circumstances where the view’s content isn’t available. But, a search that yielded no result is the only scenario Apple supported out of the box. In iOS 17, ContentUnavailableView has only one built-in static variablesearch.

You can quickly present an unavailable view that conveys an empty search result view using ContentUnavailableView.search.

struct ContentView: View {
    var body: some View {
        ContentUnavailableView.search
    }
}

With a simple line of code, you will get a magnifying glass image, a “No results” label, and a description of how to get a proper search result.

ContentUnavailableView.search

You also have another option to create an empty search view with a provided search query.

struct ContentView: View {
    var body: some View {
        ContentUnavailableView
            .search(text: "Kenrick")
    }
}
An empty search view with a search query

Custom unavailable views

If you want to use ContentUnavailableView for view other than search, you can easily do that with other initializers that accept:

  1. Label
  2. Image
  3. Description

In the following example, we create an empty view for a network error.

ContentUnavailableView(
    "No Internet",
    systemImage: "wifi.exclamationmark",
    description: Text("Try checking the network cables, modem, and router or reconnecting to Wi-Fi.")
)
A custom unavailable view.

Unavailable views with Actions

The last way of creating an unavailable view is the most flexible one.

init(
    @ViewBuilder label: () -> Label,
    @ViewBuilder description: () -> Description = { EmptyView() },
    @ViewBuilder actions: () -> Actions = { EmptyView() }
)

You can inject three @ViewBuilder that populate an unavailable view.

  1. label, which use for the title and image.
  2. description, which use for content.
  3. actions, which you can use to provide extra actions.

As you can see, we got an extra parameter, actions, which you can use to provide an action for your empty view, e.g., action buttons.

In the following example, we provide an action button that will direct users to another view.

ContentUnavailableView {
    Label("Empty Bookmarks", systemImage: "bookmark")
} description: {
    Text("Explore a great movie and bookmark the one you love to enjoy later.")
} actions: {
    Button("Browse Movies") {
        // Go to the movie list.
    }
    .buttonStyle(.borderedProminent)
}
An unavailable view with a button.

Benefit of ContentUnavailableView

While you can achieve the same thing using VStack and Text, ContentUnavailableView can save you some development time for this boring and repetitive task.

Apart from standard and consistency, ContentUnavailableView also ensures it looks great across platforms.

Here is an example of ContentUnavailableView on Apple Watch where ContentUnavailableView will automatically hide an image to save some space.

Apple Watch

Hope this article helped you understanding how we can leverage ContentUnavailableView in SwiftUI! :)

Liturgical Colors

Liturgical colors within Christian liturgy signify different seasons and times of the year. Each season has its own mood, meaning, and type of prayer. Each color has its own meaning and feeling, and can be seen worn or hung throughout the church during specific times of year. They help to visually express the different liturgical seasons and feasts, aiding in the overall experience of worship and reflection. They serve as a visual reminder of the specific themes and moods associated with each season or feast.

Good Things Take Time

In a fast-paced and instant gratification-driven world, the phrase “good things take time” may sound like a cliché. However, this timeless saying holds profound wisdom and teaches us an invaluable lesson about the nature of success and fulfillment. Whether it’s personal growth, professional achievements, or the pursuit of our dreams, the journey towards greatness demands patience, perseverance, and a steadfast belief in the power of time.

Firstly, the realization that good things take time encourages us to set realistic expectations. Overnight successes are rare and often the result of years of hard work, dedication, and resilience behind the scenes. Understanding this truth allows us to avoid the trap of seeking shortcuts or instant results. Instead, we can focus on building a strong foundation for our aspirations and taking consistent steps towards our goals.

Moreover, the journey of waiting for good things to unfold instills valuable life lessons. Patience teaches us to appreciate the present and savor each moment of the process. It offers an opportunity for self-reflection, growth, and a deeper understanding of ourselves and our desires. Along the way, we learn to embrace challenges and setbacks as stepping stones rather than barriers.

Success built on a solid foundation tends to be sustainable and long-lasting. Just like nurturing a plant from a tiny seed, investing time and effort into our endeavors allows us to cultivate skills, knowledge, and experiences that withstand the test of time. Rushing through the process may yield short-term gains, but they are often superficial and lack depth.

Embracing the principle that good things take time also cultivates resilience and perseverance. It requires us to keep pushing forward, even when faced with adversity or moments of doubt. When we encounter obstacles along the journey, we are reminded that progress is not always linear, and setbacks are a natural part of growth. The ability to stay committed and resilient in the face of challenges is a defining trait of those who achieve remarkable success.

Moreover, the process of waiting and working towards our goals allows us to savor the joy of anticipation. It fuels our passion and commitment, keeping us driven and focused on our aspirations. The anticipation of success can be a powerful motivator, encouraging us to put in the effort and dedication necessary to reach our objectives.

Lastly, good things taking time teaches us to celebrate progress rather than solely focusing on the end result. Each step forward, no matter how small, is a reason for celebration. Recognizing and appreciating the progress we make fuels our motivation and reinforces the belief that we are moving in the right direction.

In a world that often values instant results, embracing the journey and allowing success to unfold organically can be a transformative experience. Through patience, we gain wisdom, resilience, and a deeper appreciation for the process of growth. So, let us remind ourselves that as we work towards our goals and dreams, it is in the journey itself that we find the true essence of success and fulfillment.


I recall this funny story related to this topic:

A turkey was chatting with a bull. “I would love to be able to get to the top of that tree,” sighed the turkey, “but I haven’t got the energy.”

“Well, why don’t you nibble on some of my droppings?”replied the bull. “They’re packed with nutrients.”

The turkey pecked at a lump of dung and found that it actually gave him enough strength to reach the first branch of the tree. The next day, after eating some more dung, he reached the second branch. Finally, after a fortnight, there he was proudly perched at the top of the tree.

Soon, though, the turkey was promptly spotted by a farmer, who shot the turkey out of the tree.

Moral Of The Story: Bullshit might get you to the top, but it won’t keep you there.

Inspiring Change When Voices Go Unheard

In a world where opinions clash and ideas often meet resistance, the power of planting a seed, both metaphorically and literally, emerges as a testament to the indomitable human spirit. When people are closed off to listening, the act of planting a seed represents a profound metaphor for initiating positive change and sowing the seeds of transformation. There’s incredible power of planting seeds even in the face of opposition and skepticism.

Persistence in the Face of Opposition
When people are not open to listening, it can be disheartening to have one’s ideas or beliefs rejected. However, the power of planting a seed lies in the unwavering persistence of the individual. Just like a determined gardener who sows seeds despite adverse weather or poor soil conditions, individuals with a vision for positive change persistently advocate for their cause. We understand that change does not happen overnight but is a gradual process that requires patience and consistency.

Setting an Example
Planting a seed sets an example for others to follow. Actions often speak louder than words, and when we actively work towards our vision despite facing resistance, we become living examples of resilience and determination. This, in turn, can inspire others to reconsider their stance and embrace change.

Nurturing Growth in Unconventional Ways
The power of planting a seed lies in the potential for growth even in the most unexpected circumstances. Just as a tiny seed can sprout through a crack in concrete, ideas can take root in the minds of individuals who were once unreceptive. By sowing seeds of change, individuals initiate a ripple effect that can gradually penetrate even the most stubborn barriers.

Creating a Safe Space for Dialogue
Planting a seed allows us to create a safe space for dialogue and open communication. Rather than forcing ideas upon others, we see encourage discussion and understanding. This fosters an environment where opposing perspectives can be heard, leading to a more comprehensive exchange of ideas and the potential for mutual growth.

Cultivating Empathy and Understanding
When people are not open to listening, it often indicates a lack of empathy or understanding. We look to step into the shoes of others and appreciate different viewpoints. The act of nurturing growth teaches us the value of patience and compassion, making us more receptive to diverse perspectives.

Long-Term Impact
The power of planting a seed lies in its potential for long-term impact. Ideas, like seeds, can take time to germinate, but once they do, they have the capacity to grow and influence generations to come. By planting seeds today, individuals can create a lasting legacy of positive change for the future.

The power of planting a seed transcends the barriers of resistance and skepticism. It symbolizes resilience, persistence, and the belief in the potential for growth, even in challenging circumstances. By setting an example, fostering dialogue, and cultivating empathy, individuals can inspire positive change and sow the seeds of transformation in the hearts and minds of others. Let us recognize the power we hold in our hands to plant seeds of hope, for they have the potential to blossom into a better world for all.

Deeds Supersedes Prayers?

When I saw this quote on Facebook, the first thought that came to mind was “Contemplatives in Action”, a phrase that embodies the creative tension between a Jesuit’s full embrace of concrete action and their attentiveness to where God may call them next. Prayer has long been considered a powerful and essential practice in various cultures and religions, providing comfort and solace to millions. While prayer undoubtedly holds significance, the true essence of humanity lies in the act of helping others.

Prayer is a deeply personal and spiritual practice that can instill hope, guidance, and strength in individuals during challenging times. It serves as a source of inspiration, encouraging people to seek inner peace and connect with a higher power. Indeed, prayer can be a valuable tool in navigating life’s uncertainties, but it cannot be the sole means of addressing the struggles of others.

While prayers offer emotional support, helping others through tangible actions creates a more profound and meaningful impact. Kindness, empathy, and compassion in action can lift the burden of suffering from individuals in need. Whether it’s extending a helping hand to the homeless, volunteering at a local charity, or lending a listening ear to a friend in distress, helping others cultivates a sense of community and solidarity that transcends words.

Engaging in social causes can definitely be emotionally taxing, leading to burnout and compassion fatigue. And hence “contemplatives” combat these challenges by regularly retreating into introspection, recharging their emotional resilience, and fostering self-care. By maintaining a balance between inner reflection and external involvement, they are better equipped to sustain their commitment to service in the long run.

Contemplation allows us to renew our active lives (work, play, relationships) so that all we do does not become mindless action. Then the cycle repeats. Your activity leads you again into a time of stopping, resting, reflecting, and then returning to activity with greater zeal and purpose. Being a contemplative in action means that your active life feeds your contemplative life and your contemplative life informs your active life. That is what contemplation in action means, and the cycle never ends.

I had written an article previously on a similar topic which ended with a question:

Are you ready to join the CIA? (Contemplatives in Action)

St. Alphonsus Liguori

Saint Alphonsus Liguori was a very special saint who lived in Italy during the 18th century. He was a bishop, a writer, and a founder of a religious order called the Redemptorists.

Key facts:

  • Bishop, Doctor of the Church
  • Patron Saint of Arthritis, Confessors, Moralists
  • Former Lawyer
  • Ordained near the age of 30 years old
  • Founder of the Redemptorists Order
  • Composer
  • Musician
  • Poet
  • Author
  • Scholastic philosopher, and theologian
  • Died at the age of 90 on August 1, 1787
  • Beatified on 15 September 1816 by Pope Pius VII 
  • Canonized on 26 May 1839 by Pope Gregory XVI
  • Proclaimed ‘Doctor of the Church’ in 1871

Saint Alphonsus Liguori was born in 1696 and became a priest at a young age. He dedicated his life to serving God and helping people grow closer to Him. He was known for his deep love for Jesus and his devotion to the Blessed Virgin Mary.

He was the eldest of seven children of Giuseppe Liguori, a naval officer and Captain of the Royal Galleys. Liguori learned to ride and fence but was never a good shot because of poor eyesight. Myopia and chronic asthma precluded a military career so his father had him educated in the legal profession. He was taught by tutors before entering the University of Naples, where he graduated with doctorates in civil and canon law at 16. He remarked later that he was so small at the time that he was almost buried in his doctor’s gown and that all the spectators laughed. 

He became a successful lawyer. He was thinking of leaving the profession and wrote to someone, “My friend, our profession is too full of difficulties and dangers; we lead an unhappy life and run risk of dying an unhappy death”. At 27, after having lost an important case, the first he had lost in eight years of practising law, he made a firm resolution to leave the profession of law. Moreover, he heard an interior voice saying: “Leave the world, and give yourself to me.”

In 1723, he decided to offer himself as a novice to the Oratory of St. Philip Neri with the intention of becoming a priest. His father opposed the plan, but after two months (and with his Oratorian confessor’s permission), he and his father compromised: he would study for the priesthood, but not as an Oratorian, and would live at home. He was ordained on 21 December 1726, at the age of 30. He lived his first years as a priest with the homeless and the marginalized youth of Naples. He became very popular because of his plain and simple preaching. He said: “I have never preached a sermon which the poorest old woman in the congregation could not understand”. He founded the Evening Chapels, which were managed by the young people themselves. The chapels were centres of prayer and piety, preaching, community, social activities, and education. At the time of his death, there were 72, with over 10,000 active participants. His sermons were very effective at converting those who had been alienated from their faith.

On 9 November 1732, he founded the Congregation of the Most Holy Redeemer, when Sister Maria Celeste Crostarosa told him that it had been revealed to her that he was the one that God had chosen to found the congregation. He founded the congregation with the charism of preaching popular missions in the city and the countryside. Its goal was to teach and preach in the slums of cities and other poor places.

A gifted musician and composer, he wrote many popular hymns and taught them to the people in parish missions. Liguori was consecrated Bishop of Sant’Agata dei Goti in 1762. He tried to refuse the appointment by using his age and infirmities as arguments against his consecration. He wrote sermons, books, and articles to encourage devotion to the Blessed Sacrament and the Blessed Virgin Mary. 

In May 1775 he resigned as Bishop due to his health. He continued to live with the Redemptorist community in Pagani, Italy, where he died on 1 August 1787. He was beatified on 15 September 1816 by Pope Pius VII and canonized on 26 May 1839 by Pope Gregory XVI.

Your Destiny is in Your Hands

A close friend shared this quote yesterday and it got me thinking. Destiny, often perceived as an external force or predetermined fate, is a concept that has captivated humanity for centuries. While some believe that destiny is written in the stars or controlled by a higher power, I firmly believe that destiny is in our hands. It is the culmination of our choices, actions, and self-determination that ultimately shape the course of our lives and determine our future.

The Power of Choice
One of the most significant aspects that affirm our control over destiny is the power of choice. Every day, we encounter a multitude of decisions, ranging from mundane to life-changing. These choices serve as the building blocks of our journey, influencing the paths we take and the opportunities that unfold before us. The decisions we make define who we are and what we become.

Embracing Responsibility
With the power of choice comes great responsibility. Acknowledging that destiny is in our hands requires us to take ownership of our actions and their consequences. We cannot simply blame external circumstances or other people for the outcomes we experience. Instead, we must recognize that the choices we make have a profound impact on our lives and the lives of those around us.

Self-Determination and Resilience
Self-determination is the force that drives us to pursue our goals and dreams with unwavering determination. It is the ability to set our own course and navigate through life’s challenges with resilience and perseverance. By being proactive and tenacious, we can overcome obstacles and transform setbacks into opportunities for growth.

Creating Opportunities
Destiny in our hands means that we have the power to create opportunities for ourselves. Instead of waiting for fate to lead us to success, we can take the initiative to seek out and seize opportunities. Through hard work, dedication, and continuous learning, we can carve a path towards our aspirations, unlocking doors that may have previously seemed closed.

Learning from Failure
Failure is an inevitable part of life, but how we respond to it shapes our destiny. Instead of being defeated by setbacks, we can view failure as a stepping stone to success. By learning from our mistakes and using them as valuable lessons, we can adapt, grow, and ultimately find better solutions to achieve our goals.

The Impact on Others
Our destiny is not just confined to our individual lives; it also impacts those around us. The choices we make and the actions we take can influence the lives of our family, friends, and communities. By recognizing the ripple effect of our decisions, we can strive to make choices that promote positive change and create a brighter future for everyone.

Destiny is not a predetermined path set in stone; rather, it is a canvas waiting to be painted by our choices, actions, and self-determination. Embracing the belief that destiny is in our hands empowers us to take control of our lives, accept responsibility, and create a fulfilling and purposeful journey. By harnessing the power of choice, learning from failure, and embracing resilience, we can shape our destiny and leave a lasting impact on the world around us. Remember, the key to unlocking your true potential lies in your hands.


You are the master of your own destiny, 
For you make the choices, you hold the key, 
You can influence and direct your circumstances, 
You can make decisions to improve your advances, 

You can make your life what you want it to be. 
With persistence and courage to shape your destiny, 
You choose the pathway, you open the doors, 
You influence the outcome of this life of yours! 

There are always ways to improve yourself in life, 
Just as there are always ways to avoid death’s knife, 
The biggest room in the world is the room for improvement, 
So make the right choices and direct your life’s movement!

Daya Nandan

Embracing Slow Days

Productivity is a crucial aspect of achieving personal and professional goals. As an individual, I understand the significance of being highly productive to maximize efficiency and accomplish tasks effectively. However, I also recognize that productivity is not an absolute state; there will be days when the pace may slow down. Embracing both productivity and slow days is essential to strike a balance that promotes overall well-being and sustained performance.

To ensure high productivity, I adopt several strategies. Firstly, I establish a well-organized daily routine that includes setting clear goals and prioritizing tasks. By breaking down larger projects into smaller, manageable chunks, I can maintain focus and prevent feeling overwhelmed.

Maintaining physical and mental health is vital for consistent productivity. Regular exercise, proper nutrition, and sufficient rest will be prioritized to optimize cognitive abilities and maintain energy levels. I will incorporate short breaks throughout the day to prevent burnout and maintain a fresh perspective on tasks.

Moreover, I will nurture a growth mindset, viewing challenges as opportunities for learning and improvement. By seeking feedback and continuously seeking ways to enhance my skills, I can enhance my overall productivity.

Despite these efforts, it is essential to acknowledge that not every day will be equally productive. On some occasions, external factors, unforeseen circumstances, or simply mental fatigue may lead to slower days. During these times, instead of pushing myself relentlessly, I adopt a compassionate approach.

On slower days, I focus on self-care and relaxation to recharge my mind and body. Engaging in activities that bring joy, such as listening to music, reading, or spending time with loved ones, can offer much-needed rejuvenation. Embracing slower days also means giving myself permission to take a step back and reassess goals, ensuring that I approach tasks with renewed motivation when productivity returns.

Embracing the ebb and flow of productivity is not a sign of weakness but rather an acknowledgment of human nature. It allows for a healthier, more sustainable approach to achieving long-term success. Recognizing that productivity and slow days coexist enables me to strike a balance that fosters consistent growth and well-being.

In conclusion, productivity is a crucial aspect of success, but it must be balanced with self-compassion and an understanding that not every day will be equally productive. By adopting efficient strategies, maintaining physical and mental well-being, and embracing the occasional slow day, I can optimize my performance and achieve my goals while nurturing a healthy and fulfilling lifestyle. This approach ensures that my journey towards productivity is both rewarding and sustainable in the long run.


This slow Day moved along—
I heard its axles go
As if they could not hoist themselves
They hated motion so—

I told my soul to come—
It was no use to wait—
We went and played and came again
And it was out of sight—

Emily Dickinson

Faith Over Fear

In the journey of life, we are often confronted with moments of uncertainty and doubt. Fear can loom over us like a shadow, hindering our progress and preventing us from reaching our full potential. However, it is during these very moments that choosing faith over fear becomes a powerful catalyst for personal growth and transformation.

Faith is an unwavering belief in the possibility of positive outcomes, even in the face of adversity. It is the courage to trust in ourselves, in others, and in the universe’s greater plan. By choosing faith, we cultivate a mindset of optimism, hope, and resilience.

Choosing faith over fear is not about ignoring reality or denying potential challenges. Instead, it is about acknowledging fear’s presence and consciously choosing not to be controlled by it. Faith empowers us to face our fears head-on, acknowledging their existence without allowing them to dictate our actions or decisions.

Faith over fear encourages us to step outside of our comfort zones. It prompts us to pursue our dreams and aspirations, even if the path is uncertain or difficult. It is through taking these leaps of faith that we discover our true potential and resilience.

Choosing faith over fear also fosters a sense of inner peace and serenity. When we trust in the process of life and accept that not everything is within our control, we release the burden of constant worry and anxiety. Faith allows us to surrender to the present moment and to find solace in knowing that we are supported, even when the path ahead seems unclear.

By cultivating faith in ourselves, in others, and in the universe, we release the grip of fear and unlock our true potential. Faith enables us to take risks, face challenges, and pursue our dreams with unwavering determination. It nourishes our inner peace and strengthens our relationships, creating a life filled with optimism, growth, and purpose. It helps us be calm in the chaos, be serene in stressful times.


When I see this topic of keeping the faith, the first thing that comes to mind is the poem by John Greenleaf Whittier which was given to us on our school farewell day!

Don’t Quit

When things go wrong as they sometimes will,
When the road you’re trudging seems all up hill,
When the funds are low and the debts are high
And you want to smile, but you have to sigh,
When care is pressing you down a bit,
Rest if you must, but don’t you quit.

Life is strange with its twists and turns
As every one of us sometimes learns
And many a failure comes about
When he might have won had he stuck it out;
Don’t give up though the pace seems slow—
You may succeed with another blow.

Success is failure turned inside out—
The silver tint of the clouds of doubt,
And you never can tell just how close you are,
It may be near when it seems so far;
So stick to the fight when you’re hardest hit—
It’s when things seem worst that you must not quit.

Criticise Less, Contribute More

In a world where criticism and negativity can easily overshadow positivity, the art of contributing more than criticizing emerges as a powerful force for progress and unity. While constructive criticism has its place in encouraging improvement, the act of contributing goes beyond pointing out flaws to actively offering solutions and support. By embracing this mindset, we cultivate a culture of growth, collaboration, and empowerment.

Criticism, when delivered with good intentions, can be valuable feedback. However, it can often be demotivating and lead to a sense of disempowerment. On the other hand, contributing entails actively participating in conversations and endeavors, seeking ways to add value and uplift others. By taking the initiative to offer ideas, suggestions, and solutions, we create an environment where people feel encouraged and motivated to grow.

Contributing more than criticizing fosters a sense of ownership and responsibility. Instead of merely pointing out problems, we take an active role in finding solutions and implementing positive change. This proactive approach empowers individuals to take charge of their actions and decisions, leading to a greater sense of accomplishment and fulfillment.

In personal relationships, contributing instead of criticizing strengthens bonds and trust. Instead of constantly pointing out flaws, we focus on celebrating each other’s strengths and supporting growth. This creates a nurturing and uplifting environment where individuals can thrive and flourish.

Furthermore, contributing cultivates a sense of gratitude and appreciation. When we acknowledge the efforts and contributions of others, we create a positive cycle of mutual support and recognition. Gratitude fosters a culture of kindness, reinforcing the notion that our actions matter and can make a difference in the lives of others.

The act of contributing more than criticizing is a transformative mindset that empowers individuals and communities to flourish. By actively participating in conversations, offering solutions, and supporting one another, we create an environment of growth, collaboration, and positivity. This mindset enhances communication, fosters gratitude, and strengthens relationships. As we embrace the power of contributing, we become agents of positive change, leaving a lasting impact on the world around us.


There are plenty of inspirational stories on people overcoming criticism. The story of Albert Einstein is one that I truly love.

As a child, Albert Einstein had a great difficulty in speaking and reading due to his dyslexia. His teachers thought he was mentally retarded and anti social. One teacher even told his father, “No matter what he does, he will never amount to anything.” He was forced to take up a job as a clerk in a Swiss Patent office and it seemed the teacher’s prophecy was coming true. But in 1905, while still a clerk, he published a paper called the Special Theory of Relativity. The paper became so famous that by 1908, he was a considered a leading scientist and By 1921, he won the Nobel prize. By the time he died, he became the most famous scientist of all time and his name became synonymous with the word, genius. So, what happened to the critics who said he was mentally retarded and would never amount to anything? Well, nobody knows what happened to them, since nobody bothers to remember them!