如果想知道用戶手機的系統字體大小,可以使用 preferredContentSizeCategory ,它可返回用戶當前使用的字體大小;同時,當這個屬性發生變化時,系統也會發送UIContentSizeCategoryDidChangeNotification 通知。
UIContentSizeCategory str = [UIApplication sharedApplication].preferredContentSizeCategory;
如果想知道用戶手機的系統字體大小,可以使用 preferredContentSizeCategory ,它可返回用戶當前使用的字體大小;同時,當這個屬性發生變化時,系統也會發送UIContentSizeCategoryDidChangeNotification 通知。
UIContentSizeCategory str = [UIApplication sharedApplication].preferredContentSizeCategory;