You are essentially passing in an uninitialized block of memory for the color components. var colorComps = [startColorComp[0], endColorComp[0]] creates an array consisting of the first component of each color, so 2 components (not even the components you want) Further on, you pass that array of 2 elements in for:...
Variable with same name but in different class are perfectly fine and there are no side effects. So if you are declaring a button or any other ui element with same name in different class it is safe. Even if you are declaring outlets in UIViewControllers you are free to...
ios,uikit,core-graphics,uibezierpath
The equation for a circle is x = cx + r * cos(a) y = cy + r * sin(a) Where r is the radius, cx,cy the origin, and a the angle you can draw a circle with (UIBezierPath *)bezierPathWithArcCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise function by using a CGPoint as...
I did find the answer... Swift allows to override var so there is no real complication here. Just change where you use UIImageView to be using myUIImageView. class myUIImageView : UIImageView{ override var image: UIImage?{ didSet { if image != nil{ //do your stuff (add effects, layers, ...) } else...
A simple and satisfying rewrite is to cast: names.append(name: "whatever", important: importantSwitch.on as Bool) Even better, if you don't want to perform any casting or assignment dance, then use extend instead of append: names.extend([(name: "whatever", important: importantSwitch.on)]) As Martin R has said, a type alias also solves it, because it...
Yes you will need to the IBOutlet keyword to the delegate property. Like: @property (nonatomic, assign) IBOutlet id <YourDelegateClass> delegate; ...
ios,objective-c,cocoa-touch,uibutton,uikit
You should use NSUserDefaults. When save: method is called check current date [NSDate date] and save it into the user defaults. Then (when time has already passed) you retrieve the saved date from the defaults and compare it to the current date. If 23 hours have already passed you enable...
ios,xcode,swift,uikit,uiimagepickercontroller
//This class has UIButton when you click on button it opens PhotoPickersVC. Which will show all images from your application class ViewController: UIViewController,PhotoPickersDelegate { @IBOutlet var imageView:UIImageView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } @IBAction func buttonBrowsePhotos(sender: UIButton)...
You need to just subclass your main window, and you will find all touch events there. There is a handy catch-all method in UIWindow called sendEvent: which sees every event near the start of the event-handling pipeline. If you want to do any non-standard additional event handling, this is a...
While using xcasset, Xcode put all your files in a new one. 1 file to manage them all. So, you can't access to an image store inside an xcasset directly. From apple's documentation: For projects with a deployment target of at least iOS 7 or OS X 10.9, Xcode compiles...
Apparently deleting a row doesn't disable editing for that row. I added this line before deleteRowsAtIndexPaths which seems to do the trick: tableView.cellForRowAtIndexPath(indexPath)?.setEditing(false, animated: false) My understanding is that when I swipe on a cell I'm enabling editing for that cell. And because the next cell I insert is at...
For UIScrollView and its subclasses (UICollectionView, UITableView), setting the contentInset to something like, say, UIEdgeInsetsMake(64.0 /* TOP */, 0.0 /* LEFT */, 44.0 /* BOTTOM */, 0.0 /* RIGHT */); would be the way to go. You can inspect the UIViewController's properties topLayoutGuide and bottomLayoutGuide to determine how much you...
ios,cocoa-touch,uiview,keyboard,uikit
It may have todo with the fact that the keyboard is a global object. There's only ever one keyboard in memory at any given time. Also, the OS will automatically change the keyboard color based on the background. Therefore, your setting is probably just getting overridden. I would suggest hiding...
ios,user-interface,uikit,calayer,uibezierpath
You would do it exactly the way you just said - with a mask. A mask attached to a layer (or view) can make a hole through that view and its subviews. In this case, that hole is a circle. Here's an example: two UITextFields, in a view whose mask...
ios,iphone,uiwebview,uiscrollview,uikit
We already solved it in the comments, so let's just put this answer for completeness' sake. If you're using Auto Layout, make sure to change the size of the WebView by setting constraints such as a height constraint and changing its constant to make the layout change. If you want...
ios,uiviewcontroller,uikit,rubymotion
When you add the child's view, you should give it constraints to make it the same size as the container view instead of setting its frame. If you do that, then it will automatically adjust when the container view's bounds change.
I'm looking at this same problem now and am using the layer inspector to look at the navigation bar. As it turns out, the UINavigationBar actually has two colored layers in it. One of them is based on your color, and one is a semitransparent near-white layer. Have a look...
For more than 2 buttons, the user has to select "Alerts" as opposed to "Banners" in the app settings menu. The alert will have an Options button that displays the buttons in a list between Open and Close. The Alert/Banner options cannot be set programmatically. If an app is in...
First of all, all UIKIT methods should be called on the main thread including reloadData. This though won't solve your crash. Secondly, somewhere in your code there is a race condition where you are calling reloadData and changing the data source simultaneously and you need to figure out where it...
You already have this: let blueFont = UIFont(name: "HelveticaNeue-BoldItalic", size:14.0) myMutableString.addAttribute( NSFontAttributeName, value: blueFont!, range: myItalicizedRangeBlue) And this: let blueAttrs = [NSForegroundColorAttributeName : UIColor.blueColor()] So now just add another attribute: myMutableString.addAttributes( blueAttrs, range: myItalicizedRangeBlue) // or any desired range Or, combine the attributes first and add them together, if they...
ios,objective-c,uikit,selector,swizzling
I'm not familiar with CoconutKit, but swizzling is just a call to method_exchangeImplementations(). That function swaps two implementations. So if you call it again with the same parameters, you'll swap the implementations back. You'll need to look at how HLSSwizzleSelectorWithBlock_Begin builds up its call to method_exchangeImplementations() and make it again....
CGRectMake takes CGFloats for all of its arguments. Your sample code should work fine if you specify that example is supposed to be a CGFloat, using a type identifier: // v~~~~ add this... var example: CGFloat = 100 Label1.frame = CGRectMake(20, 20, 50, example) Otherwise, swift infers the type of...
Assuming you have two UIViews named view1 and view2 - [view1 addSubview:view2]; NSDictionary *views = @{@"view2" : view2}; NSArray *horzConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[view2]|" options:0 metrics:nil views:views]; NSArray *vertConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[view2]|" options:0 metrics:nil views:views]; [view1 addConstraints:horzConstraints]; [view1 addConstraints:vertConstraints]; view2.translatesAutoresizingMaskIntoConstraints = NO; ...
Open your Swift source file. Find the import UIKit line. Command-click on the word UIKit. You'll see what UIKit imports: import Foundation import UIKit.NSAttributedString import UIKit.NSFileProviderExtension import UIKit.NSLayoutConstraint import UIKit.NSLayoutManager import UIKit.NSParagraphStyle import UIKit.NSShadow import UIKit.NSStringDrawing import UIKit.NSText import UIKit.NSTextAttachment import UIKit.NSTextContainer ... many more Command-click on the word Foundation...
the timer is catching your view controller you should keep a weak reference to the timer, and add timer.invalidate() in dismissSelf https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/index.html#//apple_ref/occ/instm/NSTimer/invalidate...
ios,swift,xamarin,uikit,uiswitch
You can just not add a target action for the .ValueChanged event. Just do the switching in you're background task completion handler. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), { println("This is run on the background queue") dispatch_async(dispatch_get_main_queue(), { aSwitch.value = true }) }) EDIT: Sorry, I just understood your question. You meant that the...
ios,uitableview,cocoa-touch,uikit
You didSelectRowAtIndexPath will go with little bit changes like, - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; bool isChecked = false; if ([currentValues[indexPath.row] boolValue]) { isChecked = false; currentValues[indexPath.row] = [NSInteger numberWithBool:false]; // below is the part of code that causes trouble [self.tableView deselectRowAtIndexPath:indexPath animated:NO]; //MYCHANGES [self.tableView...
ios,uiviewcontroller,ios8,uikit,uiinterfaceorientation
As you rightly say, you are receiving this event: - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator) The second parameter is a transition coordinator. Use it! It has a targetTransform property that tells you what's about to happen....
I ran into the same issue and found out that the accessory cell.accessoryType messes with this automatic resizing when it is not None, so it seems like a bug at XCode at the moment. But as @Blankarsch mentioned, calling reloadSections(..) helps to fix this issue if you need to have...
ios,uitableview,cocoa-touch,storyboard,uikit
you need to implemented the table view delegate method heightForRowAtIndexPath: in order to change a cell's height. you can't do this purely in storyboards.
You can use outlets to modify constraints. Set constant property by code to modify the layout. ...
The text hasn't changed yet when this method is called. You have to userange and replacementString to construct the email address, and then verify that.
ios,swift,autolayout,uikit,nslayoutconstraint
Try using viewDidLayoutSubViews, that might provide the timing you are looking for in this case.
animation,uikit,uicollectionview,uicollectionviewcell,uicollectionviewlayout
I learned that the best way to achieve an effect like this is to simply subclass UICollectionViewFlowLayout and tweak cell layout attributes based on the selected cell.
ios,swift,uikit,icloud,cloudkit
Before removing cells (or adding) you need to call beginUpdates() on the involved tableView. Then remove, or add cells. When finished, call endUpdates(). Once you call endUpdates(). Remember that once you call endUpdates() your tableView model must be consistent with the number of sections and rows you removed or added....
I solved this by listening for the notification in order to track the most recent UIEvent (I provided the UIEvent in the userInfo). Then, when receiving the notification again, I made sure that it is not the same event as the one that occured just before the custom view appeared...
The problem was in z position of UITableViewCell. Actually, it was displaying the top shadow too, but the upper cell had bigger z position so that top shadow was under it. I have just changed the z position of cell layer like this: selectedCell.layer.zPosition = 999; ...
ios,uikit,uitextview,uikeyboard
Well you can handle when the user swipe to show/hide the bar(prediction bar) of UIKeyboard, First step declare a keyboard notification in viewdidLoad() and declare a global variable kbSize float kbSize; - (void)viewDidLoad { kbSize=0.0; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowNotification:) name:UIKeyboardWillShowNotification object:nil]; --- rest of your code here--- } Second step...
ios,ios8,uikit,uibarbuttonitem
Why can't you just save a reference like UIBarButtonItem *myItem = [UIBarButtonItem initWithBarButtonSystemItem: UIBarButtonSystemItemCancel target: target action: action]; Then you can check via if(myItem != nil) {} But I guess I am not understanding your question correctly. Do you want to check whether the button is hidden or not ?...
Check that you're setting the auto layout constraints so you have the top, leading and trailing spaces defined, but don't hookup a vertical height, the label will adjust itself based on the content. Edit: ...
So I finally figured it out after a couple days, the solution was simply to use [myTextView setAttributedString: myAttributedString] instead of [myTextView setText: myString]. I'm guessing the automatic conversion to the text being blue and clickable is a bug in the UIKit, because I can't imagine why that would be...
ios,uikit,apple,uipagecontrol,watchkit
As written by an Apple Engineer in the Dev Forums, it's not possible to customize the color of the page control at this time. Source: https://devforums.apple.com/message/1100695#1100695...
UINavigationControllers feature an optional UIToolbar. Simply unhide it at the start of your first view controller (in viewDidLoad for example) to have it display throughout your app, ex: navigationController.toolbarHidden = false You can subsequently set your toolbar's items within each view controller by adding items to the view controller's toolbarItems...
You shouldn't need to make that check; the appearance system will take care of it for you. In your initialiser, set lineWidth to your default value using direct ivar access instead of its setter: _lineWidth = kDefaultLineWidth; If an appearance property has been set for lineWidth, this will be overridden....
ios,objective-c,cocoa-touch,uikit,uiresponder
Maybe that is implemented with MPRemoteCommandCenter. Here is example... MPRemoteCommandCenter *remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter]; [[remoteCommandCenter skipForwardCommand] addTarget:self action:@selector(skipForward)]; [[remoteCommandCenter togglePlayPauseCommand] addTarget:self action:@selector(togglePlayPause)]; [[remoteCommandCenter pauseCommand] addTarget:self action:@selector(pause)]; [[remoteCommandCenter likeCommand] addTarget:self action:@selector(like)]; Implement this code, play music on...
You just forgot to add "/" between the folder and the file's name: let sketchPath: String = "\(destinationFolder)/\(currentProjectID).png" You should use stringByAppendingPathComponent and stringByAppendingPathExtension: let currentProjectID = "Test" // you can also use NSFileManager's method URLsForDirectory to find the device's DocumentDirectory let destinationFolder = (NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask).first as NSURL).path! let...
ios,objective-c,uikit,uisearchbar,uisearchcontroller
Updated in light of comments UISearchBar has a property (see the Apple docs) which determines whether the cancel button is displayed: self.searchBar.showsCancelButton = false; But, as per OP comments, this does not work, because the searchController keeps switching the cancel button back on. To avoid this, create a subclass of...
If you are using storyboard and present view controller using segue, the presentation attribute of segue that show you view controller with transparent background should be over full screen as shown in attachment. Then in your view controller set the background color by using this : self.view.backgroundColor = UIColor(white: 0,...
swift,storyboard,uikit,autolayout
Generally, when adding a view in IB, it's easier to add the constraint in IB, too. Then you simply don't have to deal with all the issues I'll enumerate below. But, if you're determined to create views in IB but add constraints programmatically, you should note: In Xcode 6, if...
objective-c,ios7,uikit,uifont,uifontdescriptor
Initially, I counted 4 open brackets and 3 close brackets, which will cause an error. Additionally, fontWithDescriptor: should be fontWithDescriptor:size:, which is probably the expected expression. Finally, using fontWithDescriptor:size: to define a font, then asking for its descriptor is redundant, so a cleaner version of the command is this: UIFontDescriptor...
ios,objective-c,cocoa-touch,uitextfield,uikit
If you talk about leftView and rightView, you can create subclass of UITextField and override follow methods: - (CGRect)leftViewRectForBounds:(CGRect)bounds; - (CGRect)rightViewRectForBounds:(CGRect)bounds; ...
ios,objective-c,cocoa-touch,uikit,uipasteboard
Please read this article http://nshipster.com/uimenucontroller/ (It's about UILabel, not UITextField but is useful just for example and information about how copy/paste/edit actions work and how you can customize its' behavior) I think you need to subclass UITextField to MyTextField for example, and override -(void)copy: and -(void)paste: methods from UIResponderStandardEditActions. In...
ios,objective-c,matrix,sprite-kit,uikit
You should create object and give it properties column, row. This is my algorithm of creating puzzle game something like Candy crush :D -(void)createRandomly { for (int row = 0; row < rows; row++) { for (int col = 0; col < columns; col++) { float dimension = self.frame.size.width /...
ios,objective-c,uikit,mpvolumeview
One possible way to remove this behavior is to subclass MPVolumeView and perform some additional work after [super layoutSubviews]. - (void)layoutSubviews { [super layoutSubviews]; [self xy_recursiveRemoveAnimationsOnView:self]; } - (void)xy_recursiveRemoveAnimationsOnView:(UIView *)view { [view.layer removeAllAnimations]; for (UIView *subview in view.subviews) { [self xy_recursiveRemoveAnimationsOnView:subview]; } } This removes all inserted animations. So be...
objective-c,uikit,uibezierpath
If what you are trying to do is erase everything within the thick outline of a path, use CGContextReplacePathWithStrokedPath to convert the stroke to a path. Then fill it with a clear blend mode, thus erasing the drawing along the thick path. Alternatively, just stroke the path, again using a...
ios,objective-c,xcode,uitableview,uikit
You can try by unhiding the button and Label in your first conduction like: if ((int)indexPath.row * 4 + i < [self.currentUser.friends count]) { [button setEnabled:YES]; [button setHidden:NO]; [label setHidden:NO]; // Other code } else{ ...... } ...
ios,uikit,autolayout,uisplitviewcontroller,size-classes
It is typical of me to solve my issues 5 minutes after asking them on SO. Turns out the splitViewController:collapseSecondaryViewController:ontoPrimaryViewController UISplitViewController delegate method is in charge of choosing the "collapse" of the views. What originally threw me off is that I didn't consider going back to portrait as something that...
The UIButton class, as well as lots of other UIControl subclasses can have numerous actions hooked up to them. When we are hooking up an action from interface builder to our source code file, if we open the "Event" drop down, we're presented with a long list of options: In...
Declaring GameController as NumpadPressDelegateProtocol is not enough for you to get a callback. You also need to set the pressDelegate of the NumpadView instance inside the Gamecontroller. Assuming numpadView is the instance variable be it IBOutlet or not, you have to set the delegate like Inside GameController init numpadView.pressDelegate =...
ios,cocoa-touch,uinavigationcontroller,uikit,uitabbarcontroller
I wouldn't recommend using a UINavigationController to segue from your login to your main UITabBarController... personally, I prefer to have a different rootViewController of the main UIWindow as a login or presenting the login modally (without animation)... this makes more sense, since you don't expect a user to "navigate back"...
Probably the easiest thing to do would be to create a view assembly for your xib loaded table cells, and make this one of your application assemblies. Assuming you're using plist integration then you'd add it to your app's plist as: <key>TyphoonInitialAssemblies</key> <array> <string>ViewProvider</string> <string>ApplicationAssembly</string> <string>CoreComponentsAssembly</string> <string>NetworkAssembly</string> </array> Logically it...
ios,uikit,autolayout,nslayoutconstraint
Apple's Programming Guide provides the answer: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/AutoLayoutConcepts/AutoLayoutConcepts.html#//apple_ref/doc/uid/TP40010853-CH14-SW1 Specifically, constraints represent this equation: y = m*x + b. Where 'x' and 'y' are views attributes, 'b' is the constant, and 'm' is the multiplier. 'x' and 'y' map to the first and second items in the method you're calling, respectively. So...
ios,objective-c,uiviewcontroller,uikit,xib
The right method is the following: [self presentViewController:vc2 animated: YES completion:nil]; ...
ios,storyboard,uikit,paint-code
Yes, set the canvas size to 25×25 points. You can then preview the canvas at @1x, @2x or @3x (or infinite) scale. When you ask the StyleKit for image of this canvas, the returned UIImage will have the size of 25×25 points, but scale of the current screen. That means...
completion handler does not seem to be recognizing the end of the animation UIImageView image animation doesn't have a "completion handler". It is much more simple-minded than that. If you want a completion handler, use some sort of animation that does have a completion handler. (In your case, I...
ios,objective-c,uikit,nsattributedstring,dtcoretext
Looks like DCCoreText is expecting to receive font family name, and you're providing font name which is different. Try to replace your code with [UIFont systemFontOfSize:[UIFont systemFontSize]].familyName ...
ios,iphone,cocoa-touch,swift,uikit
It comes from Objective-C. Basically it means that the action method takes a parameter. In your case the parameter passed will be the sender (i.e. the UIButton that generated the action to be called.
ios8,uibutton,autolayout,uikit,uistoryboard
Ok, this was a real school boy error. When the docs said 'The implementation of this method is empty before iOS 6' I for some reason took this to mean there's no need to call super on layoutSubviews. So the fix was: -(void) layoutSubviews { [super layoutSubviews]; // <<<<< THIS...
ios,objective-c,cocoa-touch,uikit,frontend
Cocoa Touch Framework would suffice, as it also encapsulates UIKit https://developer.apple.com/technologies/ios/cocoa-touch.html Edit: to eliminate your other thoughts, iOS is the operating system for the phone, and Objective-C is the language. What you're looking for is describing the frameworks you are using for your project-- i.e Cocoa Touch works perfectly....
You have to declare it outside of the class-body: import UIKit import SpriteKit class OneClass{ func notGlobal(){ println("not global") } func globalMethod(string:String){ println("its global") } ...
ios,uiscrollview,uibutton,uikit,uitapgesturerecognizer
I would suggest that the button is not being placed above the right scroll view properly. I know you've set the zPosition, however you should try bringing the button to the front (and sending the two scroll views to the back) using: [self.view bringSubviewToFront:button]; [self.view sendSubviewToBack:scrollView1]; [self.view sendSubviewToBack:scrollView2]; If the...
So a friend of yours is doing the design and you are doing the coding. (UIKit is a different thing indeed). I am usually starting with wireframes. From a wireframe you can actually implement a fully working app with all functionality. But that's my preference as you can work in...
ios,objective-c,autolayout,uikit,nslayoutconstraint
The addConstraint: method expect a single constraint, however the constraintsWithVisualFormat: returns an NSArray of zero or more constraints. Try adding an s. [self addConstraints:/*your NSLayoutConstraint constraintsWithVisualFormat: call */]; Apple's naming conventions can usually help you out here. Notice that constraintsWithVisualFormat is plural while addConstraint: was singular (and addConstraints: is plural)....
You can not set some properties of a view's layer through interface builder. You can set a layer's borderWidth and cornerRadius via Interface Builder tool of Xcode, but you will not be able to set borderColor using Interface Builder and it's probably because the layer.borderColor wants a CGColor instead of...
Edit: It looks like init is a special keyword Swift uses when bridging ObjC code. From the docs: Initialization To instantiate an Objective-C class in Swift, you call one of its initializers with Swift syntax. When Objective-C init methods come over to Swift, they take on native Swift initializer syntax....
ios,swift,uikit,uicollectionview
You shouldn't assign the frame value by yourself in the cellForItemAtIndexPath method. The more suitably way is to do this in the UICollectionViewLayout, then set it as the collectionview's layout property. Actually, you need a UICollectionViewLayout instance when you init the UICollectionView instance. Or simply, use the UICollectionViewFlowLayout which system...
ios,swift,uiviewcontroller,uikit,xcode-storyboard
In case anyone cares, the way that I solved this problems was by creating segues from main view controller itself and naming the segues with an identifier. Then, based on the position of the UISegmentedControl I called the segue with the identifier with the method self.performSegueWithIdentifier(<String Identifier>, sender: self).
The equivalent in iOS is UICollectionView. It's much more flexible and useful than NSMatrix, here a tutorial.
ios,objective-c,thread-safety,uikit
You could make a million concurrent calls to primaryColor and not have an issue (other than too many threads :) ). It's a read-only method. The only possible concern is if primaryColor is called at the same time as configureColors. And that's not a problem since you are calling configureColors...
ios,uikit,uitabbarcontroller,uitabbar
Button shapes is most likely on in Settings, under General>Accessibility. Changing it to foobar fixes it because it sets the selected one to a tab that doesn't exist, therefore making button shape think that it is that instead of the original view controller....
ios,objective-c,uitableview,uikit
Try to set the properties of table : tableView.estimatedRowHeight = 44.0; tableView.rowHeight = UITableViewAutomaticDimension; If content change then use notification to reload the table - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contentSizeCategoryChanged:) name:UIContentSizeCategoryDidChangeNotification object:nil]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; [[NSNotificationCenter defaultCenter]...
I would highly recommend you to stick with SpriteKit and to create menus etc with SKNodes. I know that it is really seductive to use UIKit in a game for buttons etc. but you've got many possibilities right in SpriteKit which replaces UIKit-elements. For example you can use an SKLabelNode...
In Xcode, option-click on each of the variables in use: urlString, peopleArray and theTable. The popup that appears will show you whether the variable is an optional variable by appending a ? to the class name. From your code above, urlString should not be an optional and therefore should not...
ios,objective-c,iphone,uiscrollview,uikit
According to the information you provided, you are shifting the entire view.frame by 152 pts upwards, but the size of the view remains the same. You should also increase it's height by 152 pts. That happens because the portion of the scrollView that is hidden, is still being drawn outside...
ios,objective-c,cocoa-touch,uikit,uiactivityviewcontroller
There is nothing you can do to change the standard Facebook and Twitter sharing extensions. Now that iOS 8 allows us to make custom extensions, we can see that these extensions decide for themselves which items they can handle. Apple's Extension programming guide discusses how an extension can specify which...
ios,swift,uikit,uitapgesturerecognizer,ios8.1
It crashes because target is a weak property of the UITapGestureRecognizer class and so the instance of SkinViewTransitionHelper is not retained by by the UITapGestureRecognizer. Make a property of type SKinViewTransitionHelper and store an instance on it and set it to the UITapGestureRecognizer target. class LaunchView { var skinViewHelper :...
It is very easy actually. In IB create your top, bottom, left and right constraints with heights as well. And then ctrl drag the top constraint with connects the top view to the top of the superview. Go to your class and just give the desired constant value as you...
You can do this without adding/managing your own subviews, but you will need custom images. You can use the setMinimumTrackImage:forState and setMaximumTrackImage:forState which are built in properties of the UISlider API. The minimum image will show from the minimum end of the slider to the thumb image, and the maximum...
ios,objective-c,notifications,uikit,apple-push-notifications
Take this as an example: [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [[UIApplication sharedApplication] registerForRemoteNotifications]; ...
I think your question is missing some important details that are causing the issue, so answer comes from speculating on the last comment you made. You need to have all your view controllers implement the alert view delegate that will be presenting a UIAlertView. It sounds like you implement the...
ios,objective-c,iphone,swift,uikit
This is happening for a few reasons: Adding a subview to a UINavigationBar isn't exactly unsupported, but could possibly result in odd behavior. All view controllers in a UINavigationController share the same UINavigationBar (which is why a newly pushed view controller didn't have any affect on your subview). If you...