전체 글(377)
-
ttf, otf 폰트 추가하는 법
https://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/
2017.09.09 -
[Swift] CollectionView Layout 비율 맞추기
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let width = collectionView.frame.width / 4 - 1 return CGSize(width: width, height: width)} func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: I..
2017.09.04 -
UIImageView 를 다른 UIImageView로 동일한 크기로 처리
var TempImageView: UIImageView? = nilvar img: UIImageView? = nil img.image = UIImage(data: "aaaa.png"); if let MainSize = TempImageView?.frame.size { img.frame.size = MainSize TempImageView?.contentMode = UIViewContentMode.scaleAspectFill TempImageView?.clipsToBounds = true TempImageView?.addSubview(img)} 생각나는 대로 작성을 하였기 때문에 작동은 안될 것 같다.다만 위와 비슷하게 작업으로 한다면 처리 될 것이다.
2017.08.21 -
root 패스워드 변경
mysql> select * from user where user = 'root';mysql> update user set password = password('1234') where user = 'root';mysql> flush privileges; 재로그인 하면 변경 된 것을 알 수 있다.flush privileges 를 반드시 해야지 변경된다.
2017.08.21 -
브라우저 창 크기에 따른 변화
왼쪽,오른쪽의 2개의 div가 존재한다고 가정하였을때,브라우저 창이 작아지면 width가 작아져 오른쪽 div가 아래로 내려가는 현상이 발생하는 경우가 생긴다. 나는 js로 width 사이즈를 동적으로 주고 있었기 때문에 js로 해결을 하려고한다.$(function() { $(window).resize(function() { var width = $(this).width(); var("#Right").width(width - $("#Left").width()); });});
2017.08.08 -
특정 태그 제외
간략하게 설명하자면, 클릭하였을 때 메뉴들이 보여지고 사라지는 스크립트다.그러나 다른 곳을 클릭하였을 때, 사라지지 않고 새로운 메뉴가 또 다시 열린다. $("#one").click(function() { $("#service1").toggle(); $("#service2").hide(); //클릭할 수 있는 곳이 많아지면 이부분이 늘어겠다.}); $("#two").click(function() { $("#service2").toggle(); $("#service1").hide();}); $("#one").click(function() { $("#service1").toggle(); $(".menu").not("#service1").hide(); //menu class의 service1 id를 제외하고 ..
2017.06.14