I am trying to give the font size, style as per typography & weight as per the resolution of screen dynamically.
I tried:
title_home.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.title1)
subtitle_home.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.title2)
subtitle1_home.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.title2)
subtitle2_home.font = UIFont.preferredFont(forTextStyle: UIFont.TextStyle.title2)
But am getting the text in normal regular size. I need the title as bold with some size, and it should change as per the resolution of screen.