How can I increase the picture quality in tab bar?

Viewed 34

Picture quality seems pretty low. I think the reason is because I set width and height to 30. But if I don't give width and height, the image looks huge on the tabBar. How can I fix this problem?

 private func getProfileViewController() -> UIViewController {
        let roundProcessor = RoundCornerImageProcessor(cornerRadius: 30,
                                                       targetSize: CGSize(width: 30, height: 30))
        let controller = ProfileRouter.setupModule(userId: UserManager.shared.myUser?.id ?? 0, coordinator: coordinator)
        profilePicture.kf.setImage(with: URL(string: "\(IdentificationBase.shared.getFilesBaseUrl())/\(path)"),
                                   placeholder: nil,
                                   options: [.processor(roundProcessor)]) { _ in
            controller.tabBarItem = self.createTabBarItem(icon: self.profilePicture.image?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal),
                                                          title: "edit_home".localized) }

        return controller
    }

icon

0 Answers
Related