我有一个名为randomSelection的NSMutableArray:
NSMutableArray *randomSelection;
Run Code Online (Sandbox Code Playgroud)
然后,如果满足某些条件,我会尝试向此数组添加字符串:
[randomSelection addObject:@"string1"];
Run Code Online (Sandbox Code Playgroud)
然后我尝试输出字符串,以确定它是否已添加它:
NSString *test = [randomSelection objectAtIndex:0];
NSLog(test);
Run Code Online (Sandbox Code Playgroud)
但是没有输出到错误日志,我无法弄清楚原因.
任何帮助/提示赞赏.
我见过一些解决方案,其中没有一个能解决我的问题.
我UIButton只需拖放到UIViewControllerStoryboard编辑器中即可创建.
在UIButton具有连接到.h文件的一个出口UIViewController相关联的那个视图.它也是.m文件中的Synthesized .
@property (strong, nonatomic) IBOutlet UIButton *answerButton;
Run Code Online (Sandbox Code Playgroud)
我想在运行时更改按钮的位置,就像这样;
CGRect btFrame = answerButton.frame;
btFrame.origin.x = xOne;
btFrame.origin.y = yOne;
answerButton.frame = btFrame;
Run Code Online (Sandbox Code Playgroud)
但是每当我尝试这个时,按钮就会拒绝移动.
所有其他编辑功能(如setTitle等)都是可用的,但由于某种原因,框架不会按我想要的方式移动.
有没有办法确定用户是否安装了特定的应用程序,甚至可以计算他们安装了多少个应用程序?
该信息将用于定位传递给用户的信息.