Tagged Questions
This tag should be used only on questions that are about Objective-C features or depend on code in the language. The tags "cocoa" and "cocoa-touch" should be used to ask about Apple's frameworks or classes. Use the related tags [ios] and [osx] for issues specific to those platforms.
0
votes
0answers
4 views
How to call queryForTable to reload data from Parse cloud in PFQueryTableViewController?
I have a PFQueryTableViewController table, which is getting info from parse database. When user select a row it goes to another VC. In that VC user delete some data in Parse table. This Parse table is ...
0
votes
0answers
5 views
How to prevent sprite kit game from lagging/ensuring smooth movement of nodes
In my current sprite kit project, every SKScene lags until a rate of 60 fps is reached and this takes a few seconds to do so. In my game play scene, by the time the obstacle nodes move smoothly up the ...
0
votes
2answers
10 views
Embed video HTML5 UIActivityViewController IOS
Is it possible to embed a video using HTML5 in UIActivityViewController. The code I am using below generates a blank email body when sharing via email.
NSString * shareMessage = ...
0
votes
2answers
30 views
Mutable Swift array becomes NSArray when I initialize with Obj-C
I'm creating my base models in Swift(2.0) and then controlling the views in Objective-C. I'm still new to Swift, so hopefully I'm just overlooking something simple, but here is the problem:
I’m ...
0
votes
0answers
34 views
Why is my float returning zero and repeats with UIStepper?
im multiplying price by the number of quantity chose from a UIStepper.
here is how im doing it.
- (void) stepperForQuantity:(UIStepper *)sender
{
double value = [sender value];
...
1
vote
1answer
18 views
Objective C : loadNibNamed method: how does it work?
I would know how loadNibNamed of NSBundle class works; In some document I find something like
[[NSBundle mainBundle] loadNibNamed:@"mynib" owner:self options:NULL];
without return value; just ...
1
vote
0answers
31 views
How do I force a crash due to insufficient memory?
I'm trying to debug an app with bluetooth that runs in the background. I need to make the app terminate due to insufficient memory to see if the bluetooth manager is being reinitialized by iOS after ...
0
votes
0answers
18 views
iOS like animated labels on OS X
On iOS there are several UILabel subclasses that provide nice animations for inserting and removing text. (Here), here and here
I would like to have something similar on OS X, so I tried porting the ...
1
vote
0answers
15 views
How to print an Objective-C pointer with os_trace?
I'm trying to se Activity Tracing in an iOS app, things have been working nicely up until I needed to print an Objective-C pointer.
In the slides for WWDC 14 Session 714 Apple mention that you can ...
0
votes
1answer
10 views
AFNetworking: how to associate asynchronous JSON request with UITableViewCell?
I need to make some requests for information that will be used to fill the text field of a table view cell. however that cell may be reused before the request finishes. how can I associate an ...
0
votes
1answer
27 views
Using a generic Swift class in Objective-C
Let's say I define a generic class in Swift, similar to the following:
class MyArray<T> {
func addObject(object: T) {
// do something... hopefully
}
}
(I know there is a ...
0
votes
0answers
15 views
No bundle for bundleID, SpriteKit
Every time i move to a specific scene in my SpriteKit game i get the following error in the console:
no bundle for bundleID: (null)
What could be the reason for that? ..Why always at that ...
-1
votes
0answers
11 views
GHWalkThrough github repository background image issue
Please dont vote down just because of the headline, didnt know what to call it and this I guess could be goon info for others want to implement the GHWalkThrough open source. ...
0
votes
0answers
10 views
InputAccessoryView's viewWillDisappear: method called early in iOS 9
I've ran into quite an unfortunate bug in iOS 9. It seems that when you set a UITextField.inputAccessoryView, that view's viewWillDisappear: and viewDidDisappear: methods are called prematurely (right ...
0
votes
1answer
18 views
Programmatically added subview frames don't show up right in scrollview
I'm creating a scrollView programmatically, and all the views in it. However, when I add more then 1 view, the other views layers don't show up right in their respective frames.
For example:
...
0
votes
2answers
12 views
Add a View on bottom end of another View… Like layout_below of Android
I am a developer for Android who is starting with the development for iOS.
I think I have some vices from the development environment for Android.
With Android when I want to add a View below ...
0
votes
1answer
11 views
Objective-C | Take properties and protocols declared and implemented from .m and expose publicly in .h interface
First of all, hi to everyone.
I'm really new to objective-c, just a few weeks.
I need to refactor an existing code to have certain behavior. In order to achieve that I'd have to take some properties ...
0
votes
0answers
8 views
AVCapture sending video/frames over the network
I am using AVCapture to record video 640x480 at a framerate of about 20FPS. I am trying to send this data over a local network (using Bonjour) to multiple connected clients.
I'm not trying to stream ...
0
votes
0answers
13 views
Move an UIImageView to point A to point B while ScrollView is being scrolled
I'm trying to do an custom indicator in UIPageViewController detect the scroll event and move an indicator (an UIImageView) from position x 0 to position x 15 while the Scrollview is scrolling
...
0
votes
3answers
22 views
How to find if part of search string exists in NSSet or NSArray in time better than O(n)
Lets say we have a set like this
NSSet *mySet = [NSSet setWithObjects:@"Box", @"Ball", @"Bat", nil];
and I have search string Boxer
NSString* searchString = @"Boxer";
now once i search for ...
0
votes
2answers
28 views
Objective C: I need some advice regarding properties vs ivars
I looked up my current problem on stackoverflow and many other website outlets, but I am a little confused to be quite honest. Should I only use properties when another class needs access to it and ...
-2
votes
1answer
16 views
why use NSString *const fubar = @“…”?
my understanding is that const protects whatever is to the right of it. NSString is itself immutable, so all that needs to be protected is the pointer. therefore should one not say instead the ...
0
votes
0answers
21 views
Fixing a Core Data mess up (released to app store before versioning)
I was (and still am) new to core data when I released a version (lets call it version 1.1) of my app to the app store that had a few added attributes and did not version core data.
I then learned ...
0
votes
0answers
13 views
Copy and resize UIView to capture contents
I have a UIView, setup on a superview using auto-layout and its subviews are setup too through auto-layout.
I want to be able to resize the view to capture its resized contents to a UIImage, while ...
0
votes
1answer
9 views
Xamarin Controller and xib same folder
I have just inherited a Xamarin project that keeps the Views (.xib) in a separate folder from the controllers. I find it a little difficult to scroll through the left menu and try to match up the nib ...
0
votes
0answers
16 views
NSTableView Layout issue with Highlight and Background Color
I am basically trying to recreate the popOver that exists in certain Xcode Settings, like this one in Build Settings:
I have tried both with and without using an NSArrayController to control the ...
-2
votes
0answers
6 views
has someone used QZtap for NFC/RFID, into an Iphone im currently having problems implementing it?
im trying to implement QZtap to read a device in ISO15693 but I can't manage to find how to make the reader read the card, and I couldn't find any documentation, if someone has already use this ...
0
votes
3answers
16 views
I am getting these two warnings when trying to find out if my application is in the background
UIApplicationState *state = [application applicationState];
if(state == UIApplicationStateActive)
{
NSLog(@"Display UIAlert");
}
if((state == UIApplicationStateBackground)||(state == ...
-1
votes
0answers
15 views
Count number of objects containing certain key
I have a class called "Activities" with a string column called "type". This column can be either "messages" or "alerts". I use a subquery so I when I query the table I get a PFObject back that ...
1
vote
5answers
26 views
Getting UIButton width before viewDidAppear, with AutoLayout
I have a UIButton (created in interface builder), that I'm turning into a circle by setting button.layer.borderRadius = button.frame.size.width / 2.0; (programatically, in viewDidAppear:). However, ...
0
votes
1answer
25 views
Import objective-c initializer as optional
I've got an Objective-C class whose init method may return nil. I've used a bridging header to expose this class to Swift. Unfortunately, I now have the slight problem that Swift has imported the ...
0
votes
0answers
18 views
Multiple methods named setDetail: found with mismatched result, parameter type or attributes
I just ran into a problem when opening an old iOS App with current 6.4 Xcode. I think the app was written under 4.0 before ARC.
So I have the following code and error, which used to run fine without ...
0
votes
0answers
17 views
NSTextField in statsbar menu becomes unresponsive after clicking outside the menu
I'm building a statusbar menu using custom views, and everything seems to work fine except for text fields. The first time I open the menu, everything works fine. If I close the menu by clicking the ...
0
votes
1answer
10 views
HTTP POST fails when the body has emoji in it
I am doing an HTTP POST for anything the user enters in uiTextField. The Text is captured in NSString which is then added to a NSDictionary. It then gets converted to a JSON and finally to NSData as ...
0
votes
0answers
9 views
how to create AB test on iOS app using mixpanel
i've followed the AB testing tutorial on mixpanel's site.. when I click on the AB test button on the web dashboard.. i get this silly screen
i tried putting four fingers and it never worked.. is ...
1
vote
1answer
8 views
NSTextField word wrap
I have NSTextField containing a long string, I would like the string to be split in several lines.
But now if I limit the length of the view I see the string clipped.
I have tried also to use cell's ...
0
votes
1answer
17 views
Querying non-empty arrays with NSPredicate in NSMetadataQuery
I am using NSMetadataQuery and I want to find all contacts on the system that have an email address. I don't care what the email address is, I just need them to have one.
I am giving the ...
0
votes
1answer
15 views
How to make NSMenu drop down periodically without user input
I have created a statusbar menu item on the top of my window like this:
- (void)createStatusBarItem {
_statusBar = [NSStatusBar systemStatusBar];
_statusItem = [_statusBar ...
0
votes
0answers
16 views
View zooms after scene is presented?
So I am new to swift so bare with me. I am working on a game that has a player and you shoot nodes. When the player gets hit by a node the EndScene.swift is presented. On that scene there is a "start" ...
0
votes
0answers
12 views
Does't work 'typedef NSArray SIOParameterArray;' in x-code 6.3
I'm using SIOSocket on x-code 6.3.
But 'use of undeclared type SIOParameterArray' of error appears.
SIOParameterArray is defined at SIOSocket.h 'typedef NSArray SIOParameterArray;', but it doesn't ...
0
votes
2answers
28 views
Dismissing viewController from AppDelegate
I am presenting a tutorial view, from the AppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
....
EERootVC *rootVC = ...
0
votes
0answers
7 views
iOS Dropbox API : Get thumbnails for videos with streamable URL
I want to get a thumbnail from a video stored on Dropbox.
I use this method of the DBRestClientDelegate.
- (void)restClient:(DBRestClient *)restClient loadedStreamableURL:(NSURL *)url ...
0
votes
2answers
26 views
Objective-C Block in Swift - Variable Missing?
Here's a block type that I am defining in objective-c
typedef void (^arrayBlock)(NSArray *blockArray);
I have an objective-c class with a method that uses this as a return block
...
0
votes
0answers
8 views
Animation with CABasicAnimation not working when calling from Objective C to Swift
The following lines worked fine in a Swift Project:
var yValue = 394
var startsPoint = settings.frame.origin
var endsPoint = NSPoint(x: 0, y: yValue)
var endsFrame = settings.frame
...
2
votes
0answers
16 views
What does “Arg = Owned To Guaranteed” mean in Swift crash log?
My app running perfectly without any crashes in my phone. But in some other device it get crashed with error log function signature specialization Arg[0] = Owned To Guaranteed and Exploded, Arg[1] = ...
1
vote
0answers
19 views
How to scroll the scrollview bases on UITextView content size in ios
I am adding a scrollview on UIViewController and also I have added content view on that scrollview.
After that I have added a textview on content view and textdata is coming from services.
Here my ...
1
vote
0answers
17 views
OpenGL ES 2.0 : paint in FBO + Texture = gray blending in texture
This is how I render my brush in the fragment shader :
gl_FragColor.rgb = Color.rgb;
gl_FragColor.a = Texture.a * Color.a;
With this Blending function on a (0, 0, 0, 0) texture :
...
-1
votes
1answer
22 views
Multiple UIPickers IOS
Hello I have successfully implemented one UIPicker and no i am attempting to add a second one within the same view but is proving problematic.
So they are both allocated to the same view.
- ...
0
votes
0answers
6 views
Disable audio route changes in an iOS App?
I have an audio app that plays for many hours throughout the night. Sometimes the iPhone changes says the speaker is no longer available and stops playing audio. I'm not sure why but my theory is ...
-1
votes
2answers
28 views
How to replace data in a NSARRAY where the value and key equal?
i'm inserting text field data on textFieldDidEndEditing, into an array.
but i don't want duplicates. if user changes the textfield data, i want it to be replaced by the new and updated in the ...