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 |
Tags
- duplicate symbols for architecture arm 64
- HomeBrew #MAC
- 'openURL:' is deprecated: first deprecated in iOS 10.0
- error
- Deploument Info
- ios
- objectiveC
- Project File List
- 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0
- objectiv-C
- swift하고싶다
- git
- Swift
- FIRApp configure
- The image set has an unassigned child.
- 코드설게
- swift하고싶다.
- The iOS deployment target
- 'AudioSessionSetActive' is deprecated: first deprecated in iOS 7.0 - no longer supported
- 영어읽어라
- Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
- 의존성
- Unable to install
- arch -arm64 brew install
- 프로젝트기본설명
- Swfit
- 설명
- 버전분기
- Xcode
- iOS개발
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
반응형