Is it possible to export a Balsamiq mockup to Xcode? - ios

I am about to get underway with a project, and wanted to know if it were possible to export a design mockup to Xcode 7.3. I've done some searching on google for the answer and I've seen you can add images, but I wanted to know if you could export whole wireframe projects or if i just have to recreate it all in Xcode using the wireframe as reference?

It doesn't seem to be possible for Balsamiq to export to code. You will have to rebuild the interface in Xcode's Interface Builder, as you will be able to use Autolayout and Size Classes to create truly responsive interface for all Apple products.
References:
[1] Balsamiq support "Export to Code"

Related

Can we use sketch UI elements directly into Xcode?

I am new to sketch 3. I have a hand on experience with Xcode and iOS development.
My question is wether we can directly use sketch elements in xcode or sketch is only used for prototyping the UI?
For example, If I design Label with a text field in sketch then can I used it as UI Label and UITextField in Xcode?
In my experience as a designer that also develops in Xcode any solutions that claim to go directly from Sketch into Xcode either become vapourware after some time or don't provide a very good solution. I assume it's because Auto Layout is quite complicated and fragile.
It's best to just learn iOS development using Storyboards or possibly SwiftUI for layout. There are some elements that you can get from Sketch into Xcode such as colors, typography and iconography.
Here's a list of apps that can help you with that:
Zeplin: Handoff designs and styleguides with accurate specs, assets, code snippets automatically. https://zeplin.io
InVision: Prepare designs for development. https://www.invisionapp.com/feature/inspect
Avocado: Open designs without design tools. Export images without preparing layers. Click on layers to get code.
https://avocode.com/hand-off-and-inspect
Flawless: A tool to compare the expected design and the real app right inside iOS Simulator (useful for designers who use Xcode or
mobile developers). https://flawlessapp.io
Sketch to Xcode: The fastest way to get colors from Sketch to Xcode. https://sketchtoxcode.com
Disclaimer: I'm the maker of this app.
There is not a way to integrate the sketch elements in xcode, you can use a sketch plug-in you can buy:
https://www.paintcodeapp.com/sketch
I had the same problem, the design was already prepared in the Sketch and wanted to get the code from it easily. My friends and I've working on a solution for converting design into UI codes, last 2 years.
We've developed Monday Hero platform to improve the development phase and actually save time for repetitive code. https://www.mondayhero.io
In Monday Hero, you can upload design and get responsive code with Storyboard, Xib or only code options. You can also select the elements on the design, group them as you wish for your code library and download it easily in like 15 minutes :) It was a dream of me to get the UI code that easily, I hope it can be also useful to you.

Xamarin DesignTime Custom Controls Render in XCode, edit control properties in DesignTime

I am developing an application on Xamarin.iOS and MvvmCross platforms. I use xib files instead of storyboards for design interfaces (navigation in my app based on ViewModels). How can I use Xcode's Interface Builder to render my custom controls & edit properties in IB?
Adding attributes [DesignTimeVisible (true)] for class and [Export ("Counter"), Browsable (true)] for properties does not work for XCode Interface Builder.
As far as I know in Objective-C classes there must be set #IBDesignable & #IBInspectable, if you want design time support in Xcode for custom controls.
I believe this is not possible with XCode Interface Builder since it needs to build the custom control in order to present it. And the XCode project generated by Xamarin is not buildable it is used only to track changes and generate C# code.
However you can take a look at the Xamarin Studio’s iOS designer. I think it has the feature you need.
Not exactly what you asked for but Xamarin do support basically the same thing, only using their iOS designer (which I have found rather flaky...)
https://developer.xamarin.com/guides/ios/user_interface/designer/ios_designable_controls_walkthrough/
edit: I just noticed the guy above also gave the same solution, his link is to the designer docs, mine is to the custom properties walkthrough so i'll leave it up :)

SlideMenu Like Facebook Without Using Storyboard

I'm currently working on a project that is being developed without using a single XIB and it is a huge project. We are gonna release a new version by changing the user interface. It require for me to build a Slider Menu like we find in facebook app. I have plenty of sample coding which do it and every project uses Storyboard to set it up. My question is,
Is it possible to develop that without using Storyboard?
Thanks.
The below links might help you :
https://github.com/stefanoa/SASlideMenu
https://github.com/mikefrederick/MFSideMenu
Have a look to the following link:-
https://github.com/Inferis/ViewDeck
This is one of the best slide menu example code I have used.

How can I inspect elements on native iOS application

I am running an iOS native app on iOS Simulator and would like to inspect the elements on the app to get the ID.
Does anyone knows how this can be done?
Note: Please, this question is for iOS native App not Web based app!
Thanks
It sounds like you may be looking for something like Firebug or the Chrome Inspector for your native app? I'm not sure what you mean by "ID". Interface elements in iOS don't really have IDs the same way DOM elements have IDs.
You should check out the Spark Inspector (http://www.sparkinspector.com/), which allows you to see the views of your app and modify them at runtime - it may help you see what you're looking for. Full disclosure: I am the author of the app ;-)
There is a new app, called Reveal, that does an incredible job.
Not only you can check view's properties, you can also view all the app in a "exploded" 3D view, change the sizes and properties.
Specially for iOS 7, where the view controller starts from the beginning of the screen (and not below the navigation bar), it can be really useful.
You can download the trial at http://revealapp.com and decide which license you should get.
There are two Best ways for this -
Use Accessibility Inspector which is Apples's inbuilt tool so you don't need any other support .
As you will be using Xcode mostly for you code part, there is an option to play UI recording which capture all the actions and elements that you interact with on native app.
You need to inspect the App's Bundle.
Check this answer on stackoverflow, to get the appID: https://stackoverflow.com/a/8883166/933887
Appium has an inspector for ios applications.
This is the link for appium: http://appium.io/
and in this video you can see the inspector in action: https://www.youtube.com/watch?v=jQZTRz2W9xg

Display UIView On a Mac

First off all I don't have much experience in Mac Desktop Programming. I only worked on iOS apps.
Now I would like to make a desktop application that helps me develop iOS apps. To do that I would need to display a UIView (loaded from a xib) on the desktop, similar to how interface builder works.
As far as I know desktop applications use NSView. Is there any way to display a UIView inside a NSView?
EDIT: Is there any way to convert a UIView to a NSView?
EDIT2: Is there any way to write plugins/extensions for Interface Builder?
EDIT3: I'm trying to build an application that would make the development of certain iOS apps(presentation apps) easier. For example an app that displays multiple views in a scrollview, each view having some graphical elements that are animated and some buttons that make a popup appear. This kind of apps are easy to develop but tedious. I would like to make a tool that would help me build such apps faster.
Thanks.
UIKit (the iOS UI framework, including UIView) does not run on OS X (the Mac desktop OS). There have been several efforts to create a 3rd party UIKit port to OS X. Of these, Chameleon may be the most advanced. It still implements only about 60% of UIKit (according to the project page), but has been used in shipping applications. It was developed by the makers of Twitterific to port their iOS app to OS X, and I believe is still the foundation of that product on the desktop.
Converting UIView to NSView
There is no way to "convert" a UIView to an NSView. Since you can't load UIKit on OS X (or AppKit on iOS), there's no way to instantiate a UIView and then walk its view hierarchy to instantiate an equivalent NSView. Of course, since the semantics of UIView are different from NSView, it's unclear whether there could be a deterministic mapping. NSView hierarchies are view-based, whereas UIView hierarchies make much more pervasive use of CoreAnimation layers. NSView has its roots in the NeXT AppKit framework. There are a number areas where AppKit is showing its age. UIKit is a fresh start, "fixing" many of these legacy issues in AppKit (of course, introducing it's own future "legacy" issues).
It may be possible to parse the XIB, instantiating roughly equivalent NSViews where there is a meaningful mapping from UIView to NSView. Custom UIViews will be completely off the table in this scheme, and there won't be any way to (easily) match look and feel without writing custom NSViews for each UIView (ala the Chameleon project).
IB plugins
Interface Builder 3 did suppert a plugin architecture. With Xcode 4, Interface Builder no longer supports third-party plugins. Sorry.
Edit
Unfortunately, I don't believe Chameleon can load views from XIBs, so you may have to contribute to the project if you want to load XIB views instead of instantiating them in code... as Ashley points out, you may be diving into a very deep rabbit hole.
NO. UIView only work on iPhone. Use NSView on mac.
Given your description of the app you're trying to build, I might suggest that you write XIB XML directly, rather than trying to manipulate UIViews on OS X. You might use the emulator to lay out the controls, then generate a serialized representation of the hierarchy (position, etc.) on the device. You could generate XIB XML from that serialization, either on the device or on your desktop after pulling the serialized form back from the emulator.
No, there isn't. One is part of the Cocoa (Mac) framework, the other is in CocoaTouch (iOS).
Not sure what you mean by convert a UIView to a NSView
What are you trying to achieve? Perhaps there are other ways to accomplish your goal.
You might want to check out http://chameleonproject.org/

Resources