반응형

image 6

[Swift] UITabBarController 이미지 설정

UITabBarController에서 tabBarItem에 이미지를 적용시킬 경우 아래와 같이 설정한다. navigationController.tabBarItem.image = UIImage(named: "image.png") navigationController.tabBarItem.selectedImage = UIImage(named: "selectedImage.png") 위와 같이 진행할 경우, 이미지가 tntColor로 모두 채워지는 문제가 있는데, 그럴 때는 아래와 같이 renderingMode를 alwaysOriginal로 설정해준다. navigationController.tabBarItem.image = UIImage(named: "image.png")?.withRenderingMode(.al..

[안드로이드] 이미지 경로 이미지뷰에 출력

[안드로이드] 이미지 경로 이미지뷰에 출력하기 SD-Card에서 이미지의 경로를 받아와 ImageView에 등록하는것을 원하는거라면 Bitmap을 써서File imgFile = new File("/sdcard/Images/test_image.jpg"); if(imgFile.exists()){ Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath()); ImageView myImage = (ImageView) findViewById(R.id.imageviewTest); myImage.setImageBitmap(myBitmap); } 이런식으로하시면됩니다.물론 안드로이드 매니페스트 파일에 를 등록하셔야합니다. [ 출처 : http://hash..

[안드로이드] 이미지 스와이프 (뷰페이저, ViewPager)

[안드로이드] 이미지 스와이프 (뷰페이저, ViewPager) Image Swipe 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061package com.example.kb4devimageslider; import android.app.Activity;import android.content.Context;import android.support.v4.view.PagerAdapter;import android.support.v4.view.ViewPager;import android.view.LayoutInflater;import android.view...

반응형