Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to give different images in Tab section #8

Open
KOSURUUDAYSAIKUMAR opened this issue Oct 16, 2020 · 0 comments
Open

Want to give different images in Tab section #8

KOSURUUDAYSAIKUMAR opened this issue Oct 16, 2020 · 0 comments

Comments

@KOSURUUDAYSAIKUMAR
Copy link

Hi Team,
I have an requirement, I am trying to give different images in Tab section, As I saw in Example code it is having only single image, Can you please help me Where I can put the code exactly.

I took the code:
let instagram_item = OurTeams.allTeams.map { SmoothTabItem(
title: $0.rawValue,
image: $0.instagram_image,
selectedImage: $0.selected_instagram_Image,
tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
)
}

	let facebook_item =  OurTeams.allTeams.map { SmoothTabItem(
			title: $0.rawValue,
			image: $0.facebook_image,
			selectedImage: $0.selected_facebook_Image,
			tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
			)
		}
	let twitter_item =  OurTeams.allTeams.map { SmoothTabItem(
			title: $0.rawValue,
			image: $0.twitter_image,
			selectedImage: $0.selected_twitter_Image,
			tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
			)
		}
	
	var items: [SmoothTabItem] = [instagram_item, facebook_item, twitter_item]

But it is throwing an error: Cannot convert value of type '[SmoothTabItem]' to expected element type 'SmoothTabItem'

Uploading Screenshot 2020-10-16 at 3.36.28 PM.png…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant