Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 프로젝트기본설명
- 'openURL:' is deprecated: first deprecated in iOS 10.0
- git
- 코드설게
- 버전분기
- swift하고싶다
- duplicate symbols for architecture arm 64
- Swift
- 설명
- 'AudioSessionSetActive' is deprecated: first deprecated in iOS 7.0 - no longer supported
- objectiv-C
- Xcode
- 의존성
- arch -arm64 brew install
- 영어읽어라
- The iOS deployment target
- FIRApp configure
- Swfit
- objectiveC
- Unable to install
- HomeBrew #MAC
- iOS개발
- swift하고싶다.
- Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
- Project File List
- The image set has an unassigned child.
- Deploument Info
- 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0
- ios
- error
Archives
- Today
- Total
행복한 세상의 니노
xcode error - 'sizeWithFont:' is deprecated: first deprecated in iOS 7.0 본문
IOS/IOS Error
xcode error - 'sizeWithFont:' is deprecated: first deprecated in iOS 7.0
니노z 2023. 2. 23. 15:24'sizeWithFont:' is deprecated: first deprecated in iOS 7.0
사용하지 않는대!!!!
아놔..
const CGSize titleSize = [menuItem.title sizeWithFont:titleFont];
바꿔보자.
이걸로 바뀌었군..
CGRect rawRect = {};
rawRect.size = [menuItem.title sizeWithAttributes: @{
NSFontAttributeName: [UIFont systemFontOfSize:titleFont.pointSize],
}];
const CGSize titleSize = CGRectIntegral(rawRect).size;
참고:
https://stackoverflow.com/questions/18897896/replacement-for-deprecated-sizewithfont-in-ios-7
Replacement for deprecated sizeWithFont: in iOS 7?
In iOS 7, sizeWithFont: is now deprecated. How do I now pass in the UIFont object into the replacement method sizeWithAttributes:?
stackoverflow.com
반응형