当前位置:网站首页>Objective-C member variable permissions
Objective-C member variable permissions
2022-07-04 03:34:00 【Zyryck】
Member variable permissions
Declaring member variables cannot declare properties and methods
@public Open It's OK not to pass setter/getter visit
@private Private have access to setter/getter visit , uninheritable
@protected The protected ( Default permissions ) Can be inherited , have access to setter/getter
@package Accessible within the framework , Not accessible outside the framework
#import <Foundation/Foundation.h>
@interface Person : NSObject{
@public
NSString* _name;
}
@end#import <Foundation/Foundation.h>
#import "Person.h"
int main(int argc, const char * argv[]) {
@autoreleasepool {
Person* p1 = [Person new];
//public Access to member variables
p1->_name = @"dancer";
}
return 0;
}
边栏推荐
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- Osnabrueck University | overview of specific architectures in the field of reinforcement learning
- 渗透实战-guest账户-mimikatz-向日葵-sql提权-离线解密
- 基於.NetCore開發博客項目 StarBlog - (14) 實現主題切換功能
- Rhcsa day 2
- Day05 錶格
- Rhcsa day 3
- Add IDM to Google browser
- 【.NET+MQTT】.NET6 環境下實現MQTT通信,以及服務端、客戶端的雙邊消息訂閱與發布的代碼演示
- JVM family -- heap analysis
猜你喜欢

Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website

Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami

MySQL query

Record a problem that soft deletion fails due to warehouse level error

SQL injection (1) -- determine whether there are SQL injection vulnerabilities

Audio and video technology development weekly | 232
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/94/2bdc31ec05595dbbc8a7a8d6b22252.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush

The 37 year old programmer was laid off, and he didn't find a job for 120 days. He had no choice but to go to a small company. As a result, he was confused

Lichuang EDA learning notes 14: PCB board canvas settings

Redis notes (I) Linux installation process of redis
随机推荐
Webhook triggers Jenkins for sonar detection
Experience summary of the 12th Blue Bridge Cup (written for the first time)
Unity knapsack system (code to center and exchange items)
Is online futures account opening safe and reliable? Which domestic futures company is better?
Code Execution Vulnerability - no alphanumeric rce create_ function()
Rhcsa day 2
[PaddleSeg 源码阅读] PaddleSeg Transform 的 Normalize操作
Dare to climb here, you're not far from prison, reptile reverse actual combat case
No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
Session learning diary 1
Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
In my spare time, I like to write some technical blogs and read some useless books. If you want to read more of my original articles, you can follow my personal wechat official account up technology c
Consul of distributed service registration discovery and unified configuration management
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
MySQL backup notes
WP collection plug-in free WordPress collection hang up plug-in
Eh, the log time of MySQL server is less than 8h?
CSCI 2134
National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?